-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix some event auth issues #430
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #430 +/- ##
==========================================
+ Coverage 59.23% 59.80% +0.56%
==========================================
Files 51 51
Lines 7129 7137 +8
==========================================
+ Hits 4223 4268 +45
+ Misses 2519 2477 -42
- Partials 387 392 +5 ☔ View full report in Codecov by Sentry. |
if m.oldMember.Membership == spec.Leave && m.joinRule.JoinRule == spec.Public { | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the m.oldMember.Membership == spec.Leave
portion of the check?
I think it would be more accurate just to check if the room is public. The only case to reject the join for a public room would be if the user was banned, and that is already handled before this switch block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather be explicit here, as not to open up for potential bugs.
"not_allowed": "Sender not invited or joined" | ||
} | ||
}] | ||
}`, RoomVersionV1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Room version 10 I presume?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't matter for join_rule
set to invite
, there were no changes to this, if I saw that correctly.
If I didn't miss anything, this should add fixes from: matrix-org/gomatrixserverlib#424 matrix-org/gomatrixserverlib#426 matrix-org/gomatrixserverlib#427 matrix-org/gomatrixserverlib#428 matrix-org/gomatrixserverlib#429 matrix-org/gomatrixserverlib#430
No description provided.