mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-14 10:53:30 +02:00
Merge #1862
1862: fix #1861: allow colons in passwords: fix the parsing of http-basic auth headers r=mergify[bot] a=nextgens ## What type of PR? bug-fix ## What does this PR do? Fix a bug preventing colons from being used in passwords when using radicale/webdav. Thank you to @parisni for reporting it and @ghostwheel42 for spotting it. ### Related issue(s) - close #1861 ## Prerequistes Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [X] In case of feature or enhancement: documentation updated accordingly - [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
commit
0147b19064
@ -63,7 +63,7 @@ def basic_authentication():
|
||||
authorization = flask.request.headers.get("Authorization")
|
||||
if authorization and authorization.startswith("Basic "):
|
||||
encoded = authorization.replace("Basic ", "")
|
||||
user_email, password = base64.b64decode(encoded).split(b":")
|
||||
user_email, password = base64.b64decode(encoded).split(b":", 1)
|
||||
user = models.User.query.get(user_email.decode("utf8"))
|
||||
if nginx.check_credentials(user, password.decode('utf-8'), flask.request.remote_addr, "web"):
|
||||
response = flask.Response()
|
||||
|
1
towncrier/newsfragments/1861.bugfix
Normal file
1
towncrier/newsfragments/1861.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a bug preventing colons from being used in passwords when using radicale/webdav.
|
Loading…
Reference in New Issue
Block a user