mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-27 09:58:41 +00:00
removed check for session in captcha request. sytest 11register.pl doesnt provide this and fails
This commit is contained in:
parent
2701a2a3b2
commit
0cb78f86f2
|
@ -115,12 +115,6 @@ class RecaptchaAuthChecker(UserInteractiveAuthChecker):
|
|||
raise LoginError(
|
||||
400, "Captcha response is required", errcode=Codes.CAPTCHA_NEEDED
|
||||
)
|
||||
try:
|
||||
_ = authdict["session"]
|
||||
except KeyError:
|
||||
# Client tried to provide captcha but didn't give the session ID:
|
||||
# bad request.
|
||||
raise LoginError(400, "Missing UIA session", Codes.MISSING_PARAM)
|
||||
|
||||
logger.debug("Submitting recaptcha response %s", user_response)
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class TestRecaptchaAuthChecker(unittest.TestCase):
|
|||
|
||||
d = ensureDeferred(self.recaptcha_checker.check_auth(authdict, clientip))
|
||||
f = self.failureResultOf(d, LoginError)
|
||||
self.assertEqual(f.value.errcode, Codes.MISSING_PARAM)
|
||||
self.assertEqual(f.value.errcode, Codes.UNAUTHORIZED)
|
||||
|
||||
def test_check_auth_missing_response(self: "TestRecaptchaAuthChecker") -> None:
|
||||
"""Test that authentication fails when the user captcha response is missing."""
|
||||
|
|
Loading…
Reference in a new issue