Skip to content

Commit c08ac4c

Browse files
committed
Fixed ReDos vulnerability in prototypejs (#3003)
1 parent e527e81 commit c08ac4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/prototype/prototype.js

+1-1
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)