mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/security/257] Enforce http(s) for URLs in image BBCode
SECURITY-257
This commit is contained in:
@@ -390,7 +390,7 @@ class bbcode_firstpass extends bbcode
|
||||
$in = str_replace(' ', '%20', $in);
|
||||
|
||||
// Checking urls
|
||||
if (!preg_match('#^' . get_preg_expression('url') . '$#iu', $in) && !preg_match('#^' . get_preg_expression('www_url') . '$#iu', $in))
|
||||
if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $in) && !preg_match('#^' . get_preg_expression('www_url') . '$#iu', $in))
|
||||
{
|
||||
return '[img]' . $in . '[/img]';
|
||||
}
|
||||
|
Reference in New Issue
Block a user