Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
mailinabox
Commits
f41ec93c
Commit
f41ec93c
authored
Aug 08, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
management: dont raise an exception on a poorly formatted authentication header
parent
7e62131f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
auth.py
management/auth.py
+6
-1
No files found.
management/auth.py
View file @
f41ec93c
...
@@ -47,11 +47,16 @@ class KeyAuthService:
...
@@ -47,11 +47,16 @@ class KeyAuthService:
if
header
is
None
:
if
header
is
None
:
return
return
if
" "
not
in
header
:
return
scheme
,
credentials
=
header
.
split
(
maxsplit
=
1
)
scheme
,
credentials
=
header
.
split
(
maxsplit
=
1
)
if
scheme
!=
'Basic'
:
if
scheme
!=
'Basic'
:
return
return
username
,
password
=
decode
(
credentials
)
.
split
(
':'
,
maxsplit
=
1
)
credentials
=
decode
(
credentials
)
if
":"
not
in
credentials
:
return
username
,
password
=
credentials
.
split
(
':'
,
maxsplit
=
1
)
return
username
return
username
request_key
=
parse_api_key
(
request
.
headers
.
get
(
'Authorization'
))
request_key
=
parse_api_key
(
request
.
headers
.
get
(
'Authorization'
))
...
...
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