Skip to content

Commit 9af7115

Browse files
authored
Fixed ReDos vulnerability in prototypejs (#3003)
1 parent 3d3e916 commit 9af7115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/prototype/prototype.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ Object.extend(String.prototype, (function() {
621621
}
622622

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

627627
function stripScripts() {

0 commit comments

Comments
 (0)