Problem/Motivation
NameFormatParserService.php
Lines 119-121
// Unescaped text.
case 'raw':
return $name_string;
It requires a trusted admin to deliberately enable a clearly-labeled "Raw (not recommended)" option, which is why it's Medium rather than Critical, but it's a live foot-gun.
Steps to reproduce
Proposed resolution
case 'raw':
return Markup::create(Xss::filterAdmin($name_string));
Also add a regression test that pushes <script>alert(1)</script> through NameFormatter::viewElements() and asserts it's sanitized.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork name-3586350
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:
Comments
Comment #2
bluegeek9 commentedComment #3
bluegeek9 commentedComment #6
bluegeek9 commentedComment #7
bluegeek9 commented