Skip to content

Commit bdc7d91

Browse files
committed
Fixed ReDos vulnerability in prototypejs (#3003)
1 parent 8b91292 commit bdc7d91

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)