mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/security/211] Do not match javascript URIs with URL regexes
SECURITY-211
This commit is contained in:
@@ -120,7 +120,7 @@ do
|
||||
$pct_encoded = "%[\dA-F]{2}";
|
||||
$unreserved = "$add_chars\pL0-9\-._~";
|
||||
$sub_delims = ($inline) ? '!$&\'(*+,;=' : '!$&\'()*+,;=';
|
||||
$scheme = ($inline) ? '[a-z][a-z\d+]*': '[a-z][a-z\d+\-.]*' ; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
$scheme = ($inline) ? '[a-z][a-z\d+]*(?<!javascript)': '[a-z][a-z\d+\-.]*(?<!javascript)' ; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
$pchar = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)"; // rfc: no "|"
|
||||
|
||||
$reg_name = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)+"; // rfc: * instead of + and no "|" and no "@" and no ":" (included instead of userinfo)
|
||||
|
Reference in New Issue
Block a user