mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-10 10:07:17 +00:00
Support for X-CSRF-TOKEN header (Issue #2)
This commit is contained in:
parent
95f2e61ca1
commit
abbd352392
2 changed files with 18 additions and 9 deletions
|
|
@ -346,9 +346,9 @@ def _setRequestParams():
|
|||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
if conf.csrfToken:
|
||||
if not any(conf.csrfToken in _ for _ in (conf.paramDict.get(PLACE.GET, {}), conf.paramDict.get(PLACE.POST, {}))):
|
||||
if not any(conf.csrfToken in _ for _ in (conf.paramDict.get(PLACE.GET, {}), conf.paramDict.get(PLACE.POST, {}))) and not conf.csrfToken in set(_[0].lower() for _ in conf.httpHeaders):
|
||||
errMsg = "CSRF protection token parameter '%s' not " % conf.csrfToken
|
||||
errMsg += "found in provided GET and/or POST values"
|
||||
errMsg += "found in provided GET, POST or header values"
|
||||
raise SqlmapGenericException(errMsg)
|
||||
else:
|
||||
for place in (PLACE.GET, PLACE.POST):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue