mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -04:00
Synapse 1.13.0rc2 (2020-05-14)
============================== Bugfixes -------- - Fix a long-standing bug which could cause messages not to be sent over federation, when state events with state keys matching user IDs (such as custom user statuses) were received. ([\#7376](https://github.com/matrix-org/synapse/issues/7376)) - Restore compatibility with non-compliant clients during the user interactive authentication process, fixing a problem introduced in v1.13.0rc1. ([\#7483](https://github.com/matrix-org/synapse/issues/7483)) Internal Changes ---------------- - Fix linting errors in new version of Flake8. ([\#7470](https://github.com/matrix-org/synapse/issues/7470)) -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEv27Axt/F4vrTL/8QOSor00I9eP8FAl69IQ8ACgkQOSor00I9 eP87lAf8DK+v6cs2U0BoD5opzQ7ZazJT6JYTmnMBaTzHU6Wx20V2ttkF7Vpwm3WU Zsz0048tdYtHFyYBQ1kF5RNIBBJwV8SA/QUcPkR7FVpwZMLR2q4aJn0EE7kC9OMf tYsmdbHeBdyfLXpXzazxWlgHquLyEIt52ykAcCphjx/Jl2fAExFEhtfsxpECoJ2f 8Dqhjg3WFjd6QWU6AFkElbwHUYCdIWdJOcsC8N1p8OvBmDz5QXv/RlYipHE00Cpx QQQOgEjdRc6dlz2mbetMklnfII3p2kO9bzNdmEpOzT0Zt7nFaGdntW4I1QA0yJfa gows9bYMzhqYk7YSiyTYOZ4qyavVtw== =N/zZ -----END PGP SIGNATURE----- Merge tag 'v1.13.0rc2' into develop Synapse 1.13.0rc2 (2020-05-14) ============================== Bugfixes -------- - Fix a long-standing bug which could cause messages not to be sent over federation, when state events with state keys matching user IDs (such as custom user statuses) were received. ([\#7376](https://github.com/matrix-org/synapse/issues/7376)) - Restore compatibility with non-compliant clients during the user interactive authentication process, fixing a problem introduced in v1.13.0rc1. ([\#7483](https://github.com/matrix-org/synapse/issues/7483)) Internal Changes ---------------- - Fix linting errors in new version of Flake8. ([\#7470](https://github.com/matrix-org/synapse/issues/7470))
This commit is contained in:
commit
dede23ff1e
7 changed files with 95 additions and 68 deletions
|
@ -252,7 +252,6 @@ class AuthHandler(BaseHandler):
|
|||
clientdict: Dict[str, Any],
|
||||
clientip: str,
|
||||
description: str,
|
||||
validate_clientdict: bool = True,
|
||||
) -> Tuple[dict, dict, str]:
|
||||
"""
|
||||
Takes a dictionary sent by the client in the login / registration
|
||||
|
@ -278,10 +277,6 @@ class AuthHandler(BaseHandler):
|
|||
description: A human readable string to be displayed to the user that
|
||||
describes the operation happening on their account.
|
||||
|
||||
validate_clientdict: Whether to validate that the operation happening
|
||||
on the account has not changed. If this is false,
|
||||
the client dict is persisted instead of validated.
|
||||
|
||||
Returns:
|
||||
A tuple of (creds, params, session_id).
|
||||
|
||||
|
@ -346,26 +341,30 @@ class AuthHandler(BaseHandler):
|
|||
|
||||
# Ensure that the queried operation does not vary between stages of
|
||||
# the UI authentication session. This is done by generating a stable
|
||||
# comparator based on the URI, method, and client dict (minus the
|
||||
# auth dict) and storing it during the initial query. Subsequent
|
||||
# comparator and storing it during the initial query. Subsequent
|
||||
# queries ensure that this comparator has not changed.
|
||||
if validate_clientdict:
|
||||
session_comparator = (session.uri, session.method, session.clientdict)
|
||||
comparator = (uri, method, clientdict)
|
||||
else:
|
||||
session_comparator = (session.uri, session.method) # type: ignore
|
||||
comparator = (uri, method) # type: ignore
|
||||
|
||||
if session_comparator != comparator:
|
||||
#
|
||||
# The comparator is based on the requested URI and HTTP method. The
|
||||
# client dict (minus the auth dict) should also be checked, but some
|
||||
# clients are not spec compliant, just warn for now if the client
|
||||
# dict changes.
|
||||
if (session.uri, session.method) != (uri, method):
|
||||
raise SynapseError(
|
||||
403,
|
||||
"Requested operation has changed during the UI authentication session.",
|
||||
)
|
||||
|
||||
# For backwards compatibility the registration endpoint persists
|
||||
# changes to the client dict instead of validating them.
|
||||
if not validate_clientdict:
|
||||
await self.store.set_ui_auth_clientdict(sid, clientdict)
|
||||
if session.clientdict != clientdict:
|
||||
logger.warning(
|
||||
"Requested operation has changed during the UI "
|
||||
"authentication session. A future version of Synapse "
|
||||
"will remove this capability."
|
||||
)
|
||||
|
||||
# For backwards compatibility, changes to the client dict are
|
||||
# persisted as clients modify them throughout their user interactive
|
||||
# authentication flow.
|
||||
await self.store.set_ui_auth_clientdict(sid, clientdict)
|
||||
|
||||
if not authdict:
|
||||
raise InteractiveAuthIncompleteError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue