Skip to content

Handle invalid user IDs even better#83

Open
turt2live wants to merge 1 commit intomainfrom
travis/fix-user-ids
Open

Handle invalid user IDs even better#83
turt2live wants to merge 1 commit intomainfrom
travis/fix-user-ids

Conversation

@turt2live
Copy link
Member

We previously fixed a bug where user ID handling wasn't perfect. This improves it further by checking more of the GMSL code paths, and making the check happen very early in the event check code. This allows filters to drop their custom handling. We also copy the behaviour across the rest of the user ID validation sites for safety.

Fixes #82

We're trying to validate this GMSL path specifically, which swallows errors: https://github.com/matrix-org/gomatrixserverlib/blob/20c9de33969e2df883eaa69c283d6a38efce9284/spec/senderid.go#L72

Tests aren't added for this because we can't mock the data without fighting that very code path.

Pull Request Checklist

  • Pull request is based on the main branch.
  • Pull request title describes the changes in a way a user would understand. For example, "Fix keywords filter not applying" instead of "Read keywords slice in a loop".
  • Code style matches surrounding code.
  • Tests are added for new code (and existing code) if possible.
    • If not possible, please explain why in your PR description.
  • The CI checks pass.

We previously fixed a bug where user ID handling wasn't perfect. This improves it further to also run the validation side of GMSL.
@turt2live turt2live marked this pull request as ready for review February 13, 2026 02:36
@turt2live turt2live requested a review from a team as a code owner February 13, 2026 02:36
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.

segfault: invalid memory address or nil pointer dereference

1 participant