aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roommemberevent.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-03-17 09:03:34 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-03-24 19:08:20 +0900
commite855085835909549aa866ed968e24902eb378b5a (patch)
tree975797a8b1515b22e7ffeba2e5f385dcf1212663 /lib/events/roommemberevent.cpp
parent21e5138f6cf1e96d3cac702e2ada2a0148a3ec92 (diff)
downloadlibquotient-e855085835909549aa866ed968e24902eb378b5a.tar.gz
libquotient-e855085835909549aa866ed968e24902eb378b5a.zip
RoomMemberEvent: sanitize user display names
MemberEventContent::displayName() will strip away Unicode text direction override characters. Direct access to JSON can still provide "raw" data.
Diffstat (limited to 'lib/events/roommemberevent.cpp')
-rw-r--r--lib/events/roommemberevent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp
index a5ac3c5f..6da76526 100644
--- a/lib/events/roommemberevent.cpp
+++ b/lib/events/roommemberevent.cpp
@@ -52,7 +52,7 @@ using namespace QMatrixClient;
MemberEventContent::MemberEventContent(const QJsonObject& json)
: membership(fromJson<MembershipType>(json["membership"_ls]))
, isDirect(json["is_direct"_ls].toBool())
- , displayName(json["displayname"_ls].toString())
+ , displayName(sanitized(json["displayname"_ls].toString()))
, avatarUrl(json["avatar_url"_ls].toString())
{ }