Skip to content

Commit

Permalink
Fixed ReDos vulnerability in prototypejs (#3003)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Feb 2, 2023
1 parent d28003f commit 7c14539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/prototype/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ Object.extend(String.prototype, (function() {
}

function stripTags() {
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?(\/)?>|<\/\w+>/gi, '');
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>'"])+)?\s*("[^">]*|'[^'>])?(\/)?>|<\/\w+>/gi, '');
}

function stripScripts() {
Expand Down

0 comments on commit 7c14539

Please sign in to comment.