forked from MarseyWorld/MarseyWorld
add comments to remind myself
parent
ab2464e834
commit
07b6f25ed5
|
@ -238,7 +238,7 @@ document.addEventListener("click", function (e) {
|
|||
}
|
||||
|
||||
if (!element.classList.contains("areyousure")) {
|
||||
if (element.dataset.nonce != nonce) {
|
||||
if (element.dataset.nonce != nonce) { //to stop the oldhtml attribute from being used as a vector for html injections
|
||||
console.error("Nonce check failed!")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ function timestamp(t, ti) {
|
|||
};
|
||||
|
||||
function areyousure(t) {
|
||||
if (t.dataset.nonce != nonce) {
|
||||
if (t.dataset.nonce != nonce) { //to stop the oldhtml attribute from being used as a vector for html injections
|
||||
console.error("Nonce check failed!")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ class Comment(Base):
|
|||
|
||||
body = normalize_urls_runtime(body, v)
|
||||
|
||||
body = bleach_body_html(body, runtime=True)
|
||||
body = bleach_body_html(body, runtime=True) #to stop slur filters and poll options being used as a vector for html/js injection
|
||||
|
||||
return body
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ class Post(Base):
|
|||
|
||||
body = normalize_urls_runtime(body, v)
|
||||
|
||||
body = bleach_body_html(body, runtime=True)
|
||||
body = bleach_body_html(body, runtime=True) #to stop slur filters and poll options being used as a vector for html/js injection
|
||||
|
||||
return body
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ tranny = f'<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain:" titl
|
|||
trannie = f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!marseytrain:" title=":!marseytrain:" src="{SITE_FULL_IMAGES}/e/marseytrain.webp">'
|
||||
troon = f'<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain2:" title=":marseytrain2:" src="{SITE_FULL_IMAGES}/e/marseytrain2.webp">'
|
||||
|
||||
#DON'T ADD ANY FILTERS WITH ' OR ", VECTOR FOR HTML INJECTION
|
||||
SLURS = {
|
||||
"tranny": tranny,
|
||||
"trannie": trannie,
|
||||
|
@ -30,6 +31,7 @@ SLURS = {
|
|||
"dykes": "cute butches",
|
||||
}
|
||||
|
||||
#DON'T ADD ANY FILTERS WITH ' OR ", VECTOR FOR HTML INJECTION
|
||||
if SITE_NAME == 'rDrama':
|
||||
SLURS |= {
|
||||
"retarded": "r-slurred",
|
||||
|
|
Loading…
Reference in New Issue