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 29, 2019
1 parent df64388 commit 9355cc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/ui-message/client/message.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'underscore';

import s from 'underscore.string';
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { Blaze } from 'meteor/blaze';
Expand Down Expand Up @@ -79,7 +79,8 @@ const renderBody = (msg, settings) => {
} else if (messageType.template) {
// render template
} else if (messageType.message) {
msg = TAPi18n.__(messageType.message, { ... typeof messageType.data === 'function' && messageType.data(msg) });
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;
msg = callbacks.run('renderMentions', msg);
Expand Down

0 comments on commit 9355cc5

Please sign in to comment.