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

Editing a local echo creates an invalid event that EX chokes on #26554

Open
ara4n opened this issue Nov 11, 2023 · 3 comments
Open

Editing a local echo creates an invalid event that EX chokes on #26554

ara4n opened this issue Nov 11, 2023 · 3 comments
Labels
A-E2EE A-Message-Editing O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Spec-Compliance An area where Element doesn't correctly implement the spec

Comments

@ara4n
Copy link
Member

ara4n commented Nov 11, 2023

Steps to reproduce

  1. Send messages while encryption is churning on EDR; everything gets head-of-line blocked.
  2. Edit one of the messages.
  3. On the EX side, it appears mangled:

image

Outcome

What did you expect?

Edits to local echos should not be corrupt

What happened instead?

Apparently they are.

Operating system

No response

Application version

nightly

How did you install the app?

No response

Homeserver

No response

Will you send logs?

No

@ara4n ara4n added the T-Defect label Nov 11, 2023
@ara4n
Copy link
Member Author

ara4n commented Nov 11, 2023

The edit in question here is:

    "decrypted": {
        "content": {
            "msgtype": "m.text",
            "body": " * and help unblock implementing unread-rooms (and accurate unread-notif counts)",
            "m.new_content": {
                "msgtype": "m.text",
                "body": "and help unblock implementing unread-rooms (and accurate unread-notif counts)",
                "m.mentions": {}
            },
            "m.mentions": {},
            "m.relates_to": {
                "rel_type": "m.replace",
                "event_id": "~!kCCQTCfnABLKGGvQjo:matrix.org:m1699715385559.77"
            }
        },
        "origin_server_ts": 1699715807450,
        "sender": "@matthew:matrix.org",
        "type": "m.room.message",
        "unsigned": {
            "age": 29548223,
            "transaction_id": "m1699715400921.79"
        },
        "event_id": "$0Cy8QyexJJvh6K7tIv3kcuD4T_du4z80d9nYd3SyZAE",
        "room_id": "!kCCQTCfnABLKGGvQjo:matrix.org"
    },

which looks pretty obviously mangled given it's trying to relate to a placeholder event ID (beginning with a ~).

@jplatte
Copy link

jplatte commented Nov 13, 2023

That error message (which probably shouldn't be visible directly in the timeline?) also makes no sense though, it's basically saying m.relates_to is empty, when it clearly isn't. Will investigate that when I get some time.

@t3chguy t3chguy added Z-Spec-Compliance An area where Element doesn't correctly implement the spec S-Minor Impairs non-critical functionality or suitable workarounds exist A-E2EE A-Message-Editing O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Nov 15, 2023
@t3chguy
Copy link
Member

t3chguy commented Nov 15, 2023

Only minor because another client choking on what is at best untrusted input is a major issue on their side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE A-Message-Editing O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Spec-Compliance An area where Element doesn't correctly implement the spec
Projects
None yet
Development

No branches or pull requests

3 participants