Skip to content

Commit

Permalink
[FIX] Not sanitized message types (#15054)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored and sampaiodiego committed Jul 26, 2019
1 parent 7475d76 commit 4d14918
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/ui-message/client/message.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import _ from 'underscore';
import s from 'underscore.string';
import { Blaze } from 'meteor/blaze';
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
Expand Down Expand Up @@ -78,6 +79,7 @@ const renderBody = (msg, settings) => {
} else if (messageType.template) {
// render template
} else if (messageType.message) {
msg.msg = s.escapeHTML(msg.msg);
msg = TAPi18n.__(messageType.message, { ...typeof messageType.data === 'function' && messageType.data(msg) });
} else if (msg.u && msg.u.username === settings.Chatops_Username) {
msg.html = msg.msg;
Expand Down

0 comments on commit 4d14918

Please sign in to comment.