Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
abc6986a
Commit
abc6986a
authored
9 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix regression where we incorrectly responded with a 200 to /login
parent
e624cdec
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/auth.py
+2
-1
2 additions, 1 deletion
synapse/handlers/auth.py
with
2 additions
and
1 deletion
synapse/handlers/auth.py
+
2
−
1
View file @
abc6986a
...
@@ -283,7 +283,7 @@ class AuthHandler(BaseHandler):
...
@@ -283,7 +283,7 @@ class AuthHandler(BaseHandler):
StoreError if there was a problem storing the token.
StoreError if there was a problem storing the token.
LoginError if there was an authentication problem.
LoginError if there was an authentication problem.
"""
"""
self
.
_check_password
(
user_id
,
password
)
yield
self
.
_check_password
(
user_id
,
password
)
reg_handler
=
self
.
hs
.
get_handlers
().
registration_handler
reg_handler
=
self
.
hs
.
get_handlers
().
registration_handler
access_token
=
reg_handler
.
generate_token
(
user_id
)
access_token
=
reg_handler
.
generate_token
(
user_id
)
...
@@ -291,6 +291,7 @@ class AuthHandler(BaseHandler):
...
@@ -291,6 +291,7 @@ class AuthHandler(BaseHandler):
yield
self
.
store
.
add_access_token_to_user
(
user_id
,
access_token
)
yield
self
.
store
.
add_access_token_to_user
(
user_id
,
access_token
)
defer
.
returnValue
(
access_token
)
defer
.
returnValue
(
access_token
)
@defer.inlineCallbacks
def
_check_password
(
self
,
user_id
,
password
):
def
_check_password
(
self
,
user_id
,
password
):
"""
Checks that user_id has passed password, raises LoginError if not.
"""
"""
Checks that user_id has passed password, raises LoginError if not.
"""
user_info
=
yield
self
.
store
.
get_user_by_id
(
user_id
=
user_id
)
user_info
=
yield
self
.
store
.
get_user_by_id
(
user_id
=
user_id
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment