Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Commit

Permalink
Security patch for file upload XSS issue (Studio). (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjeyd authored Apr 28, 2020
1 parent 7fc57cc commit 4091a43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cms/static/js/models/uploads.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define(['backbone', 'underscore', 'gettext'], function(Backbone, _, gettext) {
validate: function(attrs, options) {
if (attrs.selectedFile && !this.checkTypeValidity(attrs.selectedFile)) {
return {
message: _.template(gettext('Only <%= fileTypes %> files can be uploaded. Please select a file ending in <%= fileExtensions %> to upload.'))( // eslint-disable-line max-len
message: _.template(gettext('Only <%- fileTypes %> files can be uploaded. Please select a file ending in <%- (fileExtensions) %> to upload.'))( // eslint-disable-line max-len
this.formatValidTypes()
),
attributes: {selectedFile: true}
Expand Down Expand Up @@ -62,7 +62,7 @@ define(['backbone', 'underscore', 'gettext'], function(Backbone, _, gettext) {
}
var or = gettext('or');
var formatTypes = function(types) {
return _.template('<%= initial %> <%= or %> <%= last %>')({
return _.template('<%- initial %> <%- or %> <%- last %>')({
initial: _.initial(types).join(', '),
or: or,
last: _.last(types)
Expand Down

0 comments on commit 4091a43

Please sign in to comment.