mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Only use the sender when rendering the room creation event. (#7640)
On Room v11 it is possible that the sender could put in a fake creator. Don't allow this to happen.
This commit is contained in:
@@ -830,15 +830,10 @@ static NSString *const kRepliedTextPattern = @"<mx-reply>.*<blockquote>.*<br>(.*
|
||||
}
|
||||
case MXEventTypeRoomCreate:
|
||||
{
|
||||
NSString *creatorId;
|
||||
MXJSONModelSetString(creatorId, event.content[@"creator"]);
|
||||
|
||||
if (!creatorId)
|
||||
{
|
||||
// Room version 11 removes `creator` in favour of `sender`.
|
||||
// https://github.com/matrix-org/matrix-spec-proposals/pull/2175
|
||||
creatorId = event.sender;
|
||||
}
|
||||
// Room version 11 removes `creator` in favour of `sender`.
|
||||
// https://github.com/matrix-org/matrix-spec-proposals/pull/2175
|
||||
// Just use the sender as it is possible to create a v11 room and spoof the `creator`.
|
||||
NSString *creatorId = event.sender;
|
||||
|
||||
if ([creatorId isEqualToString:mxSession.myUserId])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user