Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

events with broken signatures prevent backfill #3121

Closed
richvdh opened this issue Apr 19, 2018 · 2 comments
Closed

events with broken signatures prevent backfill #3121

richvdh opened this issue Apr 19, 2018 · 2 comments
Labels
A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-minor (Deprecated Label)

Comments

@richvdh
Copy link
Member

richvdh commented Apr 19, 2018

Example: there is an event $15155055363102ERMDq:half-shot.uk in #offtopic which has an invalid signature.

My HS does not have a copy of this event, and any attempt to scroll back in #offtopic leads my server to desperately try backfilling from every other server in the room, each of which takes ages and ultimately fails in the same way.

Eventually my HS responds to riot with an empty /messages response, which riot takes to mean we have reached the beginning of the room.

(The event in question was signed with half-shot.uk:ed25519:a_YjQO. Unfortunately, two different keys have had that ID in the past, and the key currently available is apparently different from the key used to sign the event.)

@richvdh richvdh changed the title "events with broken signatures prevent backfill" "Example: there is an event $15155055363102ERMDq:half-shot.uk in #offtopic which has an invalid signature. My HS does not have a copy of this event, and any attempt to scroll back in #offtopic lead my sever to desperately try backfilling from every other server in the room, each of which takes ages and ultimately fails in the same way. Eventually my HS responds to riot with an empty /messages response, which riot takes to mean we have reached the beginning of the room. (The event in question was signed with half-shot.uk:ed25519:a_YjQO. Unfortunately, two different keys have had that ID in the past, and the key currently available is apparently different from the key used to sign the event.) ``` events with broken signatures prevent backfill Apr 19, 2018
@richvdh
Copy link
Member Author

richvdh commented Apr 20, 2018

The solution to this is presumably to mark the event as "rejected" and carry on, but the structure of synapse doesn't make that easy.

@richvdh
Copy link
Member Author

richvdh commented Sep 22, 2020

This is fixed by #8350: we now skip over any backward extremity that we fail to backfill from, so that back-pagination can continue. (Additionally, #8349 changed things so that when there is one unverifiable event in a bunch of backfill, we still accept the rest of the events in the batch, so we still get new content for the room to allow us to continue back-paginating)

@richvdh richvdh closed this as completed Sep 22, 2020
@MadLittleMods MadLittleMods added the T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. label Sep 1, 2021
@MadLittleMods MadLittleMods added the A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) label Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-minor (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants