Skip to content

Commit 5499f5f

Browse files
committed
[XSS] Fix for old pre-screening optimization exploitable to bypass the filter in recent browsers (thanks Tsubasa FUJII for reporting).
1 parent 4048694 commit 5499f5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/xss/InjectionChecker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ XSS.InjectionChecker = (async () => {
345345
.replace(this._arrayAccessRx, '_ARRAY_ACCESS_')
346346
.replace(/<([\w:]+)>[^</(="'`]+<\/\1>/g, '<$1/>') // reduce XML text nodes
347347
.replace(/<!--/g, '') // remove HTML comments preamble (see next line)
348-
.replace(/(^(?:[^/]*[=;.+-])?)\s*[\[(]+/g, '$1') // remove leading parens and braces
348+
.replace(/(^(?:[^/?]*[=;.+-])?)\s*[\[(]+/g, '$1') // remove leading parens and braces
349349
.replace(this._openIdRx, '_OPENID_SCOPE_=XYZ')
350350
.replace(/^[^=]*OPENid\.(\w+)=/gi, "OPENid_\1")
351351
.replace(this._gmxRx, '_GMX_-_GMX_');

0 commit comments

Comments
 (0)