Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aee47d3

Browse files
committed
Patch for #1601
1 parent d7d786d commit aee47d3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
from lib.core.exception import SqlmapSyntaxException
8787
from lib.core.exception import SqlmapSystemException
8888
from lib.core.exception import SqlmapUserQuitException
89+
from lib.core.exception import SqlmapValueException
8990
from lib.core.log import LOGGER_HANDLER
9091
from lib.core.optiondict import optDict
9192
from lib.core.settings import BANNER
@@ -1638,7 +1639,9 @@ def safeStringFormat(format_, params):
16381639
match = re.search(r"(\A|[^A-Za-z0-9])(%s)([^A-Za-z0-9]|\Z)", retVal)
16391640
if match:
16401641
if count >= len(params):
1641-
raise Exception("wrong number of parameters during string formatting")
1642+
warnMsg = "wrong number of parameters during string formatting. "
1643+
warnMsg += "Please report by e-mail content \"%r | %r | %r\" to '[email protected]'" % (format_, params, retVal)
1644+
raise SqlmapValueException(warnMsg)
16421645
else:
16431646
retVal = re.sub(r"(\A|[^A-Za-z0-9])(%s)([^A-Za-z0-9]|\Z)", r"\g<1>%s\g<3>" % params[count], retVal, 1)
16441647
count += 1

0 commit comments

Comments
 (0)