mirror of https://gitlab.com/bashrc2/epicyon
Allow semicolons in some other fields
parent
778f980733
commit
fdc9c0ab62
|
@ -995,6 +995,12 @@ def extractTextFieldsInPOST(postBytes, boundary, debug: bool,
|
||||||
|
|
||||||
messageFields = messageFields.split(boundary)
|
messageFields = messageFields.split(boundary)
|
||||||
fields = {}
|
fields = {}
|
||||||
|
fieldsWithSemicolonAllowed = (
|
||||||
|
'message', 'bio', 'autoCW',
|
||||||
|
'password', 'passwordconfirm',
|
||||||
|
'instanceDescription',
|
||||||
|
'instanceDescriptionShort'
|
||||||
|
)
|
||||||
# examine each section of the POST, separated by the boundary
|
# examine each section of the POST, separated by the boundary
|
||||||
for f in messageFields:
|
for f in messageFields:
|
||||||
if f == '--':
|
if f == '--':
|
||||||
|
@ -1007,7 +1013,8 @@ def extractTextFieldsInPOST(postBytes, boundary, debug: bool,
|
||||||
postKey = postStr.split('"', 1)[0]
|
postKey = postStr.split('"', 1)[0]
|
||||||
postValueStr = postStr.split('"', 1)[1]
|
postValueStr = postStr.split('"', 1)[1]
|
||||||
if ';' in postValueStr:
|
if ';' in postValueStr:
|
||||||
if postKey != 'message':
|
if postKey not in fieldsWithSemicolonAllowed and \
|
||||||
|
not postKey.startswith('edited'):
|
||||||
continue
|
continue
|
||||||
if '\r\n' not in postValueStr:
|
if '\r\n' not in postValueStr:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue