Browse Source

Merge pull request #296 from matrix-org/babolivier/return_raise

Raise IncorrectSessionTokenException instead of returning it
Brendan Abolivier 3 years ago
parent
commit
a005037342
2 changed files with 2 additions and 1 deletions
  1. 1 0
      changelog.d/296.bugfix
  2. 1 1
      sydent/validators/common.py

+ 1 - 0
changelog.d/296.bugfix

@@ -0,0 +1 @@
+Fix a bug in the error handling of 3PID session validation, if the token submitted is incorrect.

+ 1 - 1
sydent/validators/common.py

@@ -64,4 +64,4 @@ def validateSessionWithToken(sydent, sid, clientSecret, token):
         return {'success': True}
     else:
         logger.info("Incorrect token submitted")
-        return IncorrectSessionTokenException()
+        raise IncorrectSessionTokenException()