mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
Preventing double safe char encoding
This commit is contained in:
parent
190e317992
commit
728e061c53
|
@ -42,7 +42,7 @@ def safecharencode(value):
|
||||||
|
|
||||||
if isinstance(value, basestring):
|
if isinstance(value, basestring):
|
||||||
if any(_ not in SAFE_CHARS for _ in value):
|
if any(_ not in SAFE_CHARS for _ in value):
|
||||||
retVal = retVal.replace('\\', SLASH_MARKER)
|
retVal = re.sub(r'(?i)(?!\\x[0-9A-F]{2})\\', SLASH_MARKER, value)
|
||||||
|
|
||||||
for char in SAFE_ENCODE_SLASH_REPLACEMENTS:
|
for char in SAFE_ENCODE_SLASH_REPLACEMENTS:
|
||||||
retVal = retVal.replace(char, repr(char).strip('\''))
|
retVal = retVal.replace(char, repr(char).strip('\''))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user