oliver-zehentleitner / maity

web (R5 S198, info): safeUrl must refuse a backslash in a URL; clamp the i18n script name

Sign in to report

tsk-rrvff1qjdr2k Open

Security round 5, blue area 17, at 921d88e4; details with the lead / suqj.
web/js/dom.js safeUrl (~121-125) accepts a backslash, so a link can point to another host than it reads; KtW and the hub's website check already refuse it. Also i18n.choose() loads a script named after a raw language tag (callers pass a fixed list today): clamp it to the known languages.
Done when safeUrl refuses a backslash like the hub check, i18n.choose only loads known languages, and web tests cover both.