Hello community,
here is the log from the commit of package python-Flask-HTTPAuth for
openSUSE:Factory checked in at 2020-06-29 21:16:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Flask-HTTPAuth (Old)
and /work/SRC/openSUSE:Factory/.python-Flask-HTTPAuth.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Flask-HTTPAuth"
Mon Jun 29 21:16:46 2020 rev:4 rq:817569 version:4.1.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-Flask-HTTPAuth/python-Flask-HTTPAuth.changes
2020-05-04 18:40:15.957019920 +0200
+++
/work/SRC/openSUSE:Factory/.python-Flask-HTTPAuth.new.3060/python-Flask-HTTPAuth.changes
2020-06-29 21:17:50.241685978 +0200
@@ -1,0 +2,9 @@
+Sun Jun 28 19:01:44 UTC 2020 - Arun Persaud <[email protected]>
+
+- specfile:
+ * update copyright year
+
+- update to version 4.1.0:
+ * Basic authentication with custom scheme (commit)
+
+-------------------------------------------------------------------
Old:
----
Flask-HTTPAuth-4.0.0.tar.gz
New:
----
Flask-HTTPAuth-4.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Flask-HTTPAuth.spec ++++++
--- /var/tmp/diff_new_pack.QUUjYV/_old 2020-06-29 21:17:50.933688119 +0200
+++ /var/tmp/diff_new_pack.QUUjYV/_new 2020-06-29 21:17:50.937688132 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Flask-HTTPAuth
-Version: 4.0.0
+Version: 4.1.0
Release: 0
Summary: Basic and Digest HTTP authentication for Flask routes
License: MIT
++++++ Flask-HTTPAuth-4.0.0.tar.gz -> Flask-HTTPAuth-4.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Flask-HTTPAuth-4.0.0/Flask_HTTPAuth.egg-info/PKG-INFO
new/Flask-HTTPAuth-4.1.0/Flask_HTTPAuth.egg-info/PKG-INFO
--- old/Flask-HTTPAuth-4.0.0/Flask_HTTPAuth.egg-info/PKG-INFO 2020-04-27
00:30:36.000000000 +0200
+++ new/Flask-HTTPAuth-4.1.0/Flask_HTTPAuth.egg-info/PKG-INFO 2020-06-05
01:00:01.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Flask-HTTPAuth
-Version: 4.0.0
+Version: 4.1.0
Summary: Basic and Digest HTTP authentication for Flask routes
Home-page: http://github.com/miguelgrinberg/flask-httpauth/
Author: Miguel Grinberg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Flask-HTTPAuth-4.0.0/PKG-INFO
new/Flask-HTTPAuth-4.1.0/PKG-INFO
--- old/Flask-HTTPAuth-4.0.0/PKG-INFO 2020-04-27 00:30:36.382267700 +0200
+++ new/Flask-HTTPAuth-4.1.0/PKG-INFO 2020-06-05 01:00:01.615152400 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Flask-HTTPAuth
-Version: 4.0.0
+Version: 4.1.0
Summary: Basic and Digest HTTP authentication for Flask routes
Home-page: http://github.com/miguelgrinberg/flask-httpauth/
Author: Miguel Grinberg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Flask-HTTPAuth-4.0.0/flask_httpauth.py
new/Flask-HTTPAuth-4.1.0/flask_httpauth.py
--- old/Flask-HTTPAuth-4.0.0/flask_httpauth.py 2020-04-27 00:30:30.000000000
+0200
+++ new/Flask-HTTPAuth-4.1.0/flask_httpauth.py 2020-06-05 00:59:56.000000000
+0200
@@ -8,6 +8,7 @@
:license: MIT, see LICENSE for more details.
"""
+from base64 import b64decode
from functools import wraps
from hashlib import md5
from random import Random, SystemRandom
@@ -15,7 +16,7 @@
from werkzeug.datastructures import Authorization
from werkzeug.security import safe_str_cmp
-__version__ = '4.0.0'
+__version__ = '4.1.0'
class HTTPAuth(object):
@@ -191,6 +192,22 @@
self.verify_password_callback = f
return f
+ def get_auth(self):
+ # this version of the Authorization header parser is more flexible
+ # than Werkzeug's, as it also accepts other schemes besides "Basic"
+ header = self.header or 'Authorization'
+ if header not in request.headers:
+ return None
+ value = request.headers[header].encode('utf-8')
+ try:
+ scheme, credentials = value.split(b' ', 1)
+ username, password = b64decode(credentials).split(b':', 1)
+ except (ValueError, TypeError):
+ return None
+ return Authorization(
+ scheme, {'username': username.decode('utf-8'),
+ 'password': password.decode('utf-8')})
+
def authenticate(self, auth, stored_password):
if auth:
username = auth.username