-
Notifications
You must be signed in to change notification settings - Fork 639
Update regex for striptags method to prevent regex dos #349
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
👍 |
Heya, is there a test somewhere demonstrating that this works? Thanks. Ideally, this should be added to master/test/unit/tests/string.test.js |
Is there any plan to create a new release including this fix? |
This RegEx does not seem to work i tried in my project MY unit tests are failing since the UI id being created using this are incorrect/changed. Any ideas? |
Try below function stripTags() { |
Can anyone please update on this PR? |
The project is not active and will not be doing further releases. You are encouraged to apply this fix yourself after loading String.prototype.stripTags = function () {
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>'"])+)?\s*("[^">]*|'[^'>])?(\/)?>|<\/\w+>/gi, '');
}; |
Prototype isn't maintained, but the CVE can be resolved. Taken from: prototypejs/prototype#349
* Update 20_prototype.js for CVE-2020-27511 Prototype isn't maintained, but the CVE can be resolved. Taken from: prototypejs/prototype#349 * Update 20_prototype.js Change Version string * Make mis-matched single-quotes greedier
Per conversation, here is the Pull Request for the advisory. Attempt 2