mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 00:51:57 +00:00
Handle an empty cookie as an invalid macaroon. (#9620)
* Handle an empty cookie as an invalid macaroon. * Newsfragment
This commit is contained in:
parent
dd69110d95
commit
1383508f29
1
changelog.d/9620.bugfix
Normal file
1
changelog.d/9620.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a bug introduced in v1.28.0 where the OpenID Connect callback endpoint could error with a `MacaroonInitException`.
|
@ -29,6 +29,7 @@ from authlib.oidc.discovery import OpenIDProviderMetadata, get_well_known_url
|
||||
from jinja2 import Environment, Template
|
||||
from pymacaroons.exceptions import (
|
||||
MacaroonDeserializationException,
|
||||
MacaroonInitException,
|
||||
MacaroonInvalidSignatureException,
|
||||
)
|
||||
from typing_extensions import TypedDict
|
||||
@ -217,7 +218,7 @@ class OidcHandler:
|
||||
session_data = self._token_generator.verify_oidc_session_token(
|
||||
session, state
|
||||
)
|
||||
except (MacaroonDeserializationException, KeyError) as e:
|
||||
except (MacaroonInitException, MacaroonDeserializationException, KeyError) as e:
|
||||
logger.exception("Invalid session for OIDC callback")
|
||||
self._sso_handler.render_error(request, "invalid_session", str(e))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user