Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bn-patch): fix bad html evasion (#9564)
closes: #XXXX refs: endojs/endo#1837 7accc02 #9112 https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md ## Description A patch introduced in at 7accc02 in #9112 patched https://www.npmjs.com/package/bn.js/v/5.1.2 to work around the bug explained at endojs/endo#1837 . However, the fix followed the advice at endojs/endo#1837 (comment) , which is wrong for the reasons explained at endojs/endo#1837 (comment) . - wrong: rewrite `x-- > y` as `(x--, x > y)` This PR fixes that mistake by instead using the technique @gibson042 suggests at endojs/endo#1837 (comment) - correct: rewrite `x-- > y` as `[x--][0] > y` ### Security Considerations fixes an integrity bug. I have no idea how significant this bug was. ### Scaling Considerations none ### Documentation Considerations none ### Testing Considerations none ### Upgrade Considerations Well, it is a change. But I have no idea what the patched library was used for, so cannot evaluate.
- Loading branch information