File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2833,7 +2833,7 @@ def showHttpErrorCodes():
28332833 for code , count in kb .httpErrorCodes .items ())
28342834 logger .warn (warnMsg )
28352835 if not kb .injections :
2836- if any (str (_ ).startswith ('4' ) or str (_ ).startswith ('5' ) for _ in kb .httpErrorCodes .keys ()):
2836+ if any (( str (_ ).startswith ('4' ) or str (_ ).startswith ('5' )) and _ != httplib . INTERNAL_SERVER_ERROR and _ != kb . originalCode for _ in kb .httpErrorCodes .keys ()):
28372837 msg = "too many 4xx and/or 5xx HTTP error codes "
28382838 msg += "could mean that some kind of protection is involved (e.g. WAF)"
28392839 logger .warn (msg )
Original file line number Diff line number Diff line change @@ -476,8 +476,9 @@ def getPage(**kwargs):
476476 page = page if isinstance (page , unicode ) else getUnicode (page )
477477
478478 code = e .code
479- threadData .lastHTTPError = (threadData .lastRequestUID , code )
480479
480+ kb .originalCode = kb .originalCode or code
481+ threadData .lastHTTPError = (threadData .lastRequestUID , code )
481482 kb .httpErrorCodes [code ] = kb .httpErrorCodes .get (code , 0 ) + 1
482483
483484 status = getUnicode (e .msg )
You can’t perform that action at this time.
0 commit comments