Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
39dda3f5
Commit
39dda3f5
authored
Apr 15, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix opds login with colon in password #1952
parent
1cb8dbe7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
usermanagement.py
cps/usermanagement.py
+3
-2
No files found.
cps/usermanagement.py
View file @
39dda3f5
...
@@ -75,8 +75,9 @@ def load_user_from_auth_header(header_val):
...
@@ -75,8 +75,9 @@ def load_user_from_auth_header(header_val):
basic_username
=
basic_password
=
''
# nosec
basic_username
=
basic_password
=
''
# nosec
try
:
try
:
header_val
=
base64
.
b64decode
(
header_val
)
.
decode
(
'utf-8'
)
header_val
=
base64
.
b64decode
(
header_val
)
.
decode
(
'utf-8'
)
basic_username
=
header_val
.
split
(
':'
)[
0
]
# Users with colon are invalid: rfc7617 page 4
basic_password
=
header_val
.
split
(
':'
)[
1
]
basic_username
=
header_val
.
split
(
':'
,
1
)[
0
]
basic_password
=
header_val
.
split
(
':'
,
1
)[
1
]
except
(
TypeError
,
UnicodeDecodeError
,
binascii
.
Error
):
except
(
TypeError
,
UnicodeDecodeError
,
binascii
.
Error
):
pass
pass
user
=
_fetch_user_by_name
(
basic_username
)
user
=
_fetch_user_by_name
(
basic_username
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment