forked-synapse/synapse/handlers
Jonathan de Jong f5c93fc993
Fix #8518 (sync requests being cached wrongly on timeout) (#9358)
This fixes #8518 by adding a conditional check on `SyncResult` in a function when `prev_stream_token == current_stream_token`, as a sanity check. In `CachedResponse.set.<remove>()`, the result is immediately popped from the cache if the conditional function returns "false".

This prevents the caching of a timed-out `SyncResult` (that has `next_key` as the stream key that produced that `SyncResult`). The cache is prevented from returning a `SyncResult` that makes the client request the same stream key over and over again, effectively making it stuck in a loop of requesting and getting a response immediately for as long as the cache keeps those values.

Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
2021-02-24 13:57:00 +00:00
..
ui_auth UI Auth via SSO: redirect the user to an appropriate SSO. (#9081) 2021-01-12 17:38:03 +00:00
__init__.py Remove the deprecated Handlers object (#8494) 2020-10-09 07:24:34 -04:00
_base.py Simplify the flow for SSO UIA (#8881) 2020-12-08 14:03:38 +00:00
account_data.py Allow moving account data and receipts streams off master (#9104) 2021-01-18 15:47:59 +00:00
account_validity.py Add type hints for account validity handler (#8620) 2020-10-26 14:17:31 -04:00
acme_issuing_service.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
acme.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
admin.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
appservice.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
auth.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
cas_handler.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
deactivate_account.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
device.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
devicemessage.py Ratelimit cross-user key sharing requests. (#8957) 2021-02-19 13:20:34 -05:00
directory.py Allow spam-checker modules to be provide async methods. (#8890) 2020-12-11 14:05:15 -05:00
e2e_keys.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
e2e_room_keys.py Add type hints to E2E handler. (#9232) 2021-01-28 08:34:19 -05:00
events.py Ratelimit cross-user key sharing requests. (#8957) 2021-02-19 13:20:34 -05:00
federation.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
groups_local.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
identity.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
initial_sync.py Ratelimit cross-user key sharing requests. (#8957) 2021-02-19 13:20:34 -05:00
message.py Add configs to make profile data more private (#9203) 2021-02-19 09:50:41 +00:00
oidc_handler.py Support for form_post in OIDC responses (#9376) 2021-02-17 10:15:14 +00:00
pagination.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
password_policy.py Add type hints to some handlers (#8505) 2020-10-09 07:20:51 -04:00
presence.py Be smarter about which hosts to send presence to when processing room joins (#9402) 2021-02-19 11:37:29 +00:00
profile.py Fix style checking due to updated black. 2021-02-19 08:19:54 -05:00
read_marker.py Allow moving account data and receipts streams off master (#9104) 2021-01-18 15:47:59 +00:00
receipts.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
register.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
room_list.py Add type hints to admin and room list handlers. (#8973) 2020-12-29 17:42:10 -05:00
room_member_worker.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
room_member.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
room.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
saml_handler.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
search.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
set_password.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
sso.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
state_deltas.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
stats.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
sync.py Fix #8518 (sync requests being cached wrongly on timeout) (#9358) 2021-02-24 13:57:00 +00:00
typing.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
user_directory.py Add back the guard against the user directory stream position not existing. (#9428) 2021-02-18 08:44:19 -05:00