removed check for session in captcha request. sytest 11register.pl doesnt provide this and fails

This commit is contained in:
Louis Gregg 2024-12-14 22:50:59 +01:00
parent 2701a2a3b2
commit 0cb78f86f2
2 changed files with 1 additions and 7 deletions

View file

@ -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)

View file

@ -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."""