Fix for "security vulnerability" in img tag

git-svn-id: file:///svn/phpbb/trunk@2544 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
the_systech 2002-04-24 15:00:33 +00:00
parent 1386605952
commit 559dff21b7

View file

@ -282,7 +282,7 @@ function bbencode_first_pass($text, $uid)
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);
// [img]image_url_here[/img] code.. // [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text); $text = preg_replace("#\[img\](([a-z]+?)://([^ \"\n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);
// Remove our padding from the string.. // Remove our padding from the string..
$text = substr($text, 1); $text = substr($text, 1);