mirror of https://gitlab.com/bashrc2/epicyon
Check for dangerous markup in about text or ToS
parent
67ea679887
commit
3019846433
|
@ -191,6 +191,7 @@ from utils import isSuspended
|
||||||
from manualapprove import manualDenyFollowRequest
|
from manualapprove import manualDenyFollowRequest
|
||||||
from manualapprove import manualApproveFollowRequest
|
from manualapprove import manualApproveFollowRequest
|
||||||
from announce import createAnnounce
|
from announce import createAnnounce
|
||||||
|
from content import dangerousMarkup
|
||||||
from content import replaceEmojiFromTags
|
from content import replaceEmojiFromTags
|
||||||
from content import addHtmlTags
|
from content import addHtmlTags
|
||||||
from content import extractMediaInFormPOST
|
from content import extractMediaInFormPOST
|
||||||
|
@ -2913,6 +2914,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if nickname == adminNickname:
|
if nickname == adminNickname:
|
||||||
if fields.get('editedAbout'):
|
if fields.get('editedAbout'):
|
||||||
aboutStr = fields['editedAbout']
|
aboutStr = fields['editedAbout']
|
||||||
|
if not dangerousMarkup(aboutStr):
|
||||||
aboutFile = open(aboutFilename, "w+")
|
aboutFile = open(aboutFilename, "w+")
|
||||||
if aboutFile:
|
if aboutFile:
|
||||||
aboutFile.write(aboutStr)
|
aboutFile.write(aboutStr)
|
||||||
|
@ -2923,6 +2925,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
if fields.get('editedTOS'):
|
if fields.get('editedTOS'):
|
||||||
TOSStr = fields['editedTOS']
|
TOSStr = fields['editedTOS']
|
||||||
|
if not dangerousMarkup(TOSStr):
|
||||||
TOSFile = open(TOSFilename, "w+")
|
TOSFile = open(TOSFilename, "w+")
|
||||||
if TOSFile:
|
if TOSFile:
|
||||||
TOSFile.write(TOSStr)
|
TOSFile.write(TOSStr)
|
||||||
|
|
Loading…
Reference in New Issue