mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 01:19:21 -05:00
Fix user-interactive password auth
this got broken in the previous commit
This commit is contained in:
parent
4c8f94ac94
commit
979eed4362
@ -270,6 +270,7 @@ class AuthHandler(BaseHandler):
|
|||||||
sess = self._get_session_info(session_id)
|
sess = self._get_session_info(session_id)
|
||||||
return sess.setdefault('serverdict', {}).get(key, default)
|
return sess.setdefault('serverdict', {}).get(key, default)
|
||||||
|
|
||||||
|
@defer.inlineCallbacks
|
||||||
def _check_password_auth(self, authdict, _):
|
def _check_password_auth(self, authdict, _):
|
||||||
if "user" not in authdict or "password" not in authdict:
|
if "user" not in authdict or "password" not in authdict:
|
||||||
raise LoginError(400, "", Codes.MISSING_PARAM)
|
raise LoginError(400, "", Codes.MISSING_PARAM)
|
||||||
@ -277,10 +278,11 @@ class AuthHandler(BaseHandler):
|
|||||||
user_id = authdict["user"]
|
user_id = authdict["user"]
|
||||||
password = authdict["password"]
|
password = authdict["password"]
|
||||||
|
|
||||||
return self.validate_login(user_id, {
|
(canonical_id, callback) = yield self.validate_login(user_id, {
|
||||||
"type": LoginType.PASSWORD,
|
"type": LoginType.PASSWORD,
|
||||||
"password": password,
|
"password": password,
|
||||||
})
|
})
|
||||||
|
defer.returnValue(canonical_id)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _check_recaptcha(self, authdict, clientip):
|
def _check_recaptcha(self, authdict, clientip):
|
||||||
|
Loading…
Reference in New Issue
Block a user