dualfroz 1e51c75014 fix(template-helper): restrict escapeButPreserveUris to http/https schemes
escapeButPreserveUris() matched any scheme via [A-z]+?://, which also
turns javascript://, vbscript:// and data:// URIs into clickable links
on the generated error page, allowing script execution on click (XSS).
The [A-z] class was also invalid, spanning extra ASCII punctuation.

Restrict the scheme to http/https, the only two schemes that make
sense to linkify on an error page, leaving other schemes as plain
escaped text.
2026-09-04 22:16:53 +02:00
S
Description
My contributions to filp/whoops: 4 commits, 2 merged PRs
69 KiB
0 Stars 1 Watchers 0 Forks
Languages
PHP 100%