federation/eventauth: fix restricted joins typo
Some checks failed
Go / Lint (latest) (push) Has been cancelled
Go / Build (old, libolm) (push) Has been cancelled
Go / Build (latest, libolm) (push) Has been cancelled
Go / Build (old, goolm) (push) Has been cancelled
Go / Build (latest, goolm) (push) Has been cancelled

This commit is contained in:
Tulir Asokan 2025-11-01 22:19:57 +01:00
commit 6e7b692098
2 changed files with 2 additions and 2 deletions

View file

@ -310,7 +310,7 @@ func authorizeMember(roomVersion id.RoomVersion, evt, createEvt *pdu.PDU, authEv
// 5.1. If there is no state_key property, or no membership property in content, reject.
return ErrMemberNotState
}
authorizedVia := id.UserID(gjson.GetBytes(evt.Content, "authorized_via_users_server").Str)
authorizedVia := id.UserID(gjson.GetBytes(evt.Content, "authorised_via_users_server").Str)
if authorizedVia != "" {
homeserver := authorizedVia.Homeserver()
err := evt.VerifySignature(roomVersion, homeserver, getKey)

View file

@ -61,7 +61,7 @@ func (pdu *PDU) AuthEventSelection(roomVersion id.RoomVersion) (keys AuthEventSe
}
}
if membership == event.MembershipJoin && roomVersion.RestrictedJoins() {
authorizedVia := gjson.GetBytes(pdu.Content, "authorized_via_users_server").Str
authorizedVia := gjson.GetBytes(pdu.Content, "authorised_via_users_server").Str
if authorizedVia != "" {
keys.Add(event.StateMember.Type, authorizedVia)
}