From 75905e0cd93149b75b2dd037a1934bf4fc6a6d47 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 3 Mar 2022 17:55:50 +0100 Subject: [PATCH] Minor update of 3rd party bottle library --- lib/core/settings.py | 2 +- thirdparty/bottle/bottle.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 113194fe7..ca748f72a 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.6.3.0" +VERSION = "1.6.3.1" 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/thirdparty/bottle/bottle.py b/thirdparty/bottle/bottle.py index be42bcbcc..48aefbb69 100644 --- a/thirdparty/bottle/bottle.py +++ b/thirdparty/bottle/bottle.py @@ -1363,7 +1363,7 @@ class BaseRequest(object): def _get_body_string(self, maxread): """ Read body into a string. Raise HTTPError(413) on requests that are - to large. """ + too large. """ if self.content_length > maxread: raise HTTPError(413, 'Request entity too large') data = self.body.read(maxread + 1) @@ -1594,7 +1594,7 @@ class BaseRequest(object): def __setattr__(self, name, value): if name == 'environ': return object.__setattr__(self, name, value) key = 'bottle.request.ext.%s' % name - if key in self.environ: + if hasattr(self, name): raise AttributeError("Attribute already defined: %s" % name) self.environ[key] = value @@ -1655,7 +1655,7 @@ class BaseResponse(object): default_status = 200 default_content_type = 'text/html; charset=UTF-8' - # Header blacklist for specific response codes + # Header denylist for specific response codes # (rfc2616 section 10.2.3 and 10.3.5) bad_headers = { 204: frozenset(('Content-Type', 'Content-Length')), @@ -2928,8 +2928,8 @@ def static_file(filename, root, ims = getenv('HTTP_IF_MODIFIED_SINCE') if ims: ims = parse_date(ims.split(";")[0].strip()) - if ims is not None and ims >= int(stats.st_mtime): - return HTTPResponse(status=304, **headers) + if ims is not None and ims >= int(stats.st_mtime): + return HTTPResponse(status=304, **headers) body = '' if request.method == 'HEAD' else open(filename, 'rb')