Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove age_ts from reference hash calculation #1536

Merged
merged 4 commits into from May 23, 2023

Conversation

MichaelKohler
Copy link
Contributor

@MichaelKohler MichaelKohler commented May 23, 2023

Signed-off-by: Michael Kohler <me@michaelkohler.info>
@MichaelKohler MichaelKohler requested a review from a team as a code owner May 23, 2023 20:44
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ftr, I'm happy that this does not need an MSC because aside from some random example in unsigned in the appendices, age_ts shows up literally nowhere else.

This implies that it's from an ancient and long-since deprecated version of the spec.

changelogs/server_server/newsfragments/1536.clarification Outdated Show resolved Hide resolved
Co-authored-by: Travis Ralston <travpc@gmail.com>
@turt2live turt2live merged commit c6348c9 into matrix-org:main May 23, 2023
10 checks passed
@morguldir
Copy link

So my HS discovered a join event in HQ from March 10th 2023 with the age_ts key. If you look above ruma faithfully implemented the change, and now such an event isn't passing auth in Condu(wu)it

Raw Event

{
    "auth_events": [
        "$b_onTjnTaifE1ZhoyuAvBG0-ibtoair17-XL9tDC91s", 
        "$MaPUZG2fNleIE_gUYDmOy-nj0Zom8mQ5FNM7gEAVI6I", 
        "$cqtvWbNUS-f2uwi7Lp6RUbwNnvtorTXDBaH0Qx1-Ej4", 
        "$0QMsU7XVvBu1aJbnq8GZpB47MdbJTvvrWrTM1YaqgHE"
    ], 
    "content": {
        "avatar_url": "mxc://matrix.grainscom.de/fEzcWRPpQWXzRJsvrkpgDlXc", 
        "displayname": "Timo", 
        "membership": "join"
    }, 
    "depth": 551301, 
    "hashes": {
        "sha256": "1UqIuYiF6FzUfe7/SRxUHedH9qLx5PcKYAfg+VSKAlw"
    }, 
    "origin": "matrix.grainscom.de", 
    "origin_server_ts": 1678452391464, 
    "prev_events": [
        "$JIcpQSJrTXaQ0khR3xOKENU50UVbz1tvjNxCXRtSt2k"
    ], 
    "room_id": "!OGEhHVWSdvArJzumhm:matrix.org", 
    "sender": "@fritzi:matrix.grainscom.de", 
    "state_key": "@fritzi:matrix.grainscom.de", 
    "type": "m.room.member", 
    "age_ts": 1678452396191, 
    "signatures": {
        "matrix.grainscom.de": {
            "ed25519:a_pQPq": "bgW0udTENViCidANG3A6nha/DGpgOKfI7MQFgxhbeZAf2ffX4ultFAZt+JJlgLszfvMkKCvPfUHglin7z/uuAg"
        }
    }, 
    "unsigned": {
        "age": 1, 
        "replaces_state": "$b_onTjnTaifE1ZhoyuAvBG0-ibtoair17-XL9tDC91s"
    }
}

homeserver_1  | 2024-04-06T02:58:41.386997Z  WARN ruma_state_res: auth event id for $38b0HozwA-NMcHiA6RV8DA509d98-B9e-oH2gVaursE is missing $6xN8lpeq-QwU5x5SBsav-Rmz0pXFIzCXfM01bGfSNEw
homeserver_1  | 2024-04-06T02:59:14.640150Z  WARN conduit::service::rooms::event_handler: Dropping bad event $38b0HozwA-NMcHiA6RV8DA509d98-B9e-oH2gVaursE: Verification error: Could not verify signature: signature error: Verification equation was not satisfied
homeserver_1  | 2024-04-06T02:59:14.640182Z  WARN conduit::service::rooms::event_handler: Authentication of event $38b0HozwA-NMcHiA6RV8DA509d98-B9e-oH2gVaursE failed: M_INVALID_PARAM: Signature verification failed
homeserver_1  | 2024-04-06T02:59:14.640225Z  WARN conduit::service::rooms::event_handler: Could not find auth event $38b0HozwA-NMcHiA6RV8DA509d98-B9e-oH2gVaursE

How should this be resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reference hash calculation references age_ts, which is no longer present on events
3 participants