Ignore invalid room IDs in allow rules

This commit is contained in:
Neil Alexander 2021-11-10 12:34:05 +00:00
parent e9bee83b03
commit 3ba7291598
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -225,7 +225,9 @@ func attemptMakeJoinForRestrictedMembership(
for _, allowed := range joinRules.Allow {
// Skip types that we don't know about.
if allowed.Type != gomatrixserverlib.MRoomMembership {
logger.Infof("Skipping unknown join rule type %q", allowed.Type)
continue
}
if _, _, err := gomatrixserverlib.SplitID('!', allowed.RoomID); err != nil {
continue
}