Merge pull request #722 from Thulinma/noHtmlFixes

Fix two more HTML injection attacks.
pull/726/head
DeepBlueV7.X 3 years ago committed by GitHub
commit e88ab89c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/RoomsModel.cpp
  2. 4
      src/timeline/Reaction.h

@ -77,7 +77,7 @@ RoomsModel::data(const QModelIndex &index, int role) const
return QString::fromStdString(
roomInfos.at(roomids[index.row()]).avatar_url);
case Roles::RoomID:
return roomids[index.row()];
return roomids[index.row()].toHtmlEscaped();
}
}
return {};

@ -16,8 +16,8 @@ struct Reaction
Q_PROPERTY(int count READ count)
public:
QString key() const { return key_; }
QString users() const { return users_; }
QString key() const { return key_.toHtmlEscaped(); }
QString users() const { return users_.toHtmlEscaped(); }
QString selfReactedEvent() const { return selfReactedEvent_; }
int count() const { return count_; }

Loading…
Cancel
Save