-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic html sanitizer w/regex to avoid xss scripting attack (#…
…652)
- Loading branch information
1 parent
c6cfe18
commit ffc682b
Showing
2 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffc682b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this broke using
onclick="glovalFunction()"
get converted to"globalFunction()"
causing prod to break :/ can this be an opt in? there must be away to allow this without xssffc682b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syonfox
another user said the same thing, but the thing is you're never supposed to put JS code in a formatter because that is an open door to XSS scripting attack, you're suppose to use the onClick event which is a more secure way of dealing with events.
Anyway, I did another PR #657 to optionally overwrite it, however we didn't release a new version yet.
ffc682b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks I'll look into refactoring. Glad there will be an option to disable it in the future for edge cases. this snip-it may be especially usefully to those who find this.
#652 (comment)