diff --git a/lib/core/common.py b/lib/core/common.py index c9b3d887b..ed71fe843 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -99,6 +99,7 @@ from lib.core.settings import INVALID_UNICODE_CHAR_FORMAT from lib.core.settings import ISSUES_PAGE from lib.core.settings import IS_WIN from lib.core.settings import LARGE_OUTPUT_THRESHOLD +from lib.core.settings import MIN_ENCODED_LEN_CHECK from lib.core.settings import MIN_TIME_RESPONSES from lib.core.settings import ML from lib.core.settings import NULL @@ -570,7 +571,7 @@ def paramToDict(place, parameters=None): for encoding in ("hex", "base64"): try: decoded = value.decode(encoding) - if all(_ in string.printable for _ in decoded): + if len(decoded) > MIN_ENCODED_LEN_CHECK and all(_ in string.printable for _ in decoded): warnMsg = "provided parameter '%s' " % parameter warnMsg += "seems to be '%s' encoded" % encoding logger.warn(warnMsg) diff --git a/lib/core/settings.py b/lib/core/settings.py index e6c075e6e..a5a8f5d4a 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -506,6 +506,9 @@ MIN_BINARY_DISK_DUMP_SIZE = 100 # Regular expression used for extracting form tags FORM_SEARCH_REGEX = r"(?si)