Problem/Motivation
SA-CORE-2026-001's tests from the private issue have not yet been added to core.
Proposed resolution
Add the tests.
Remaining tasks
NR.
Issue fork drupal-3633288
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3633288-main
changes, plain diff MR !17580
Comments
Comment #3
xjmOn porting this over from the private issue, I noticed the following:
(and similar).
For the purposes of this issue, that may well provide the necessary test coverage. We should for sure revert SA-CORE-2026-001 locally and check, including documenting exactly how it fails when that's reverted.
In general, however, when we test XSS, we should use payloads that do not contain HTML special characters.
For example,
alert(String.fromCharCode(88,83,83))can still achieve XSS in cases wherealert("XSS")doesn't. Some naïve XSS sanitization will escape the"to a", which results in invalid HTML and therefore no attack. But the same simple escaping will not catch the quote-free payload.Comment #4
smustgrave commentedReverted the commit from https://git.drupalcode.org/project/drupal/-/commit/bba7977d9c35c010d826e...
Applied the MR and ran the test and got
Random, this is a large test. Would it be worth a follow up to breakout some? Happy to make that for a first time contribution
LGTM though.
Comment #5
alexpottBackported to 11.5.x to keep test coverage aligned and 11.x security tested.
Thanks @xjm for doing the work of updating the commit credit.
Committed and pushed 7312a1251af to main and f600cefad54 to 12.0.x and d8a9a813369 to 11.x and 557f6081842 to 11.5.x. Thanks!