Ensure that text fields from POST are unquoted

merge-requests/8/head
Bob Mottram 2020-12-03 14:59:07 +00:00
parent 38376b61f4
commit c0eedb0716
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ __status__ = "Production"
import os import os
import email.parser import email.parser
import urllib.parse
from shutil import copyfile from shutil import copyfile
from utils import getImageExtensions from utils import getImageExtensions
from utils import loadJson from utils import loadJson
@ -991,5 +992,5 @@ def extractTextFieldsInPOST(postBytes, boundary, debug: bool) -> {}:
if line > 2: if line > 2:
postValue += '\n' postValue += '\n'
postValue += postLines[line] postValue += postLines[line]
fields[postKey] = postValue fields[postKey] = urllib.parse.unquote_plus(postValue)
return fields return fields