From d9e6e678e8483b5ee0898744bcb65e4cd792fb2d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 10 Dec 2020 23:05:19 +0100 Subject: [PATCH] Fixes #4470 --- lib/core/settings.py | 2 +- lib/request/redirecthandler.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index f602fff4d..2f88d49ac 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.4.12.22" +VERSION = "1.4.12.23" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/request/redirecthandler.py b/lib/request/redirecthandler.py index f3d0bc960..dc0cf4ff7 100644 --- a/lib/request/redirecthandler.py +++ b/lib/request/redirecthandler.py @@ -31,6 +31,7 @@ from lib.core.settings import MAX_TOTAL_REDIRECTIONS from lib.core.threads import getCurrentThreadData from lib.request.basic import decodePage from lib.request.basic import parseResponse +from thirdparty import six from thirdparty.six.moves import urllib as _urllib class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler): @@ -182,7 +183,7 @@ class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler): threadData.lastRedirectURL = (threadData.lastRequestUID, redurl) result.redcode = code - result.redurl = getUnicode(redurl) + result.redurl = getUnicode(redurl) if six.PY3 else redurl return result http_error_301 = http_error_303 = http_error_307 = http_error_302