mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Truncate the URI to the size of the database field before we check it to ensure that what is stored in the database is the same as that we checked
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5501 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1ace2eca07
commit
5384eedd68
1 changed files with 2 additions and 0 deletions
|
@ -100,6 +100,8 @@ function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
|
||||||
$avatar_filename = 'http://' . $avatar_filename;
|
$avatar_filename = 'http://' . $avatar_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$avatar_filename = substr($avatar_filename, 0, 100);
|
||||||
|
|
||||||
if ( !preg_match("#^((ht|f)tp://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png))$)#is", $avatar_filename) )
|
if ( !preg_match("#^((ht|f)tp://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png))$)#is", $avatar_filename) )
|
||||||
{
|
{
|
||||||
$error = true;
|
$error = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue