Skip to content

Commit

Permalink
Avoid XSS issues while deleting account and looking at logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioo committed Jan 26, 2023
1 parent 718ee43 commit eef9ab7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modoboa/admin/static/admin/js/admin.js
Expand Up @@ -408,7 +408,7 @@ Identities.prototype = {
}

$("a[name=delaccount]").confirm({
question: function() { return this.$element.attr('title'); },
question: function() { return htmlEncode(this.$element.attr('title')); },
method: "POST",
checkboxes: deloptions,
success_cb: $.proxy(this.reload_listing, this)
Expand Down
2 changes: 1 addition & 1 deletion modoboa/core/templates/core/logs_page.html
Expand Up @@ -5,6 +5,6 @@
<td>{{ l.date_created|date:"SHORT_DATETIME_FORMAT" }}</td>
<td>{{ l.level|colorize_level|safe }}</td>
<td>{{ l.logger }}</td>
<td>{{ l.message|tohtml|safe }}</td>
<td>{{ l.message }}</td>
</tr>
{% endfor %}
2 changes: 1 addition & 1 deletion modoboa/static/js/autocompleter.js
Expand Up @@ -56,7 +56,7 @@
$.each(this.choices, $.proxy(function(index, value) {
if (exp.test(value)) {
this.$menu.append(
$('<li><a href="#" name="' + value + '">' + value + '</a></li>')
$('<li><a href="#" name="' + htmlEncode(value) + '">' + htmlEncode(value) + '</a></li>')
);
}
}, this));
Expand Down

0 comments on commit eef9ab7

Please sign in to comment.