1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

Merge pull request #60 from phpbb/ticket/security/257

[ticket/security/257] Enforce http(s) for URLs in image BBCode
This commit is contained in:
Marc Alexander
2020-07-25 11:16:04 +02:00
3 changed files with 10 additions and 1 deletions

View File

@@ -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]';
}