Add functions to cover one half, the not encoded part, of issue 2512 #2521
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR tries to cover one half of issue #2512, the not Unicode encoded part, by adding some functions that were used in the bypass.
This PR only covers the reported functions, but maybe we should have a look at other document properties and not only document.domain (https://developer.mozilla.org/en-US/docs/Web/API/Document/domain).
And the same for
atob()
,btoa()
andalert()
(https://www.w3schools.com/jsref/obj_window.asp) -> I chose the PHP file because they have been mentioned together witheval()
and the enhancement of this existing file was simple and quick. But maybe we should add a separate rule with Javascript functions instead of adding them to the existing PHP file?Nevertheless, I'm pushing this PR now, also as a concrete basis for discussion. We can still make changes.
Next, we also need a PR to cover the Unicode part of the reported bypass. I'll have a look at this too.