mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 02:36:38 +02:00
Ok, I've done so much here, I can hardly remember what I've done...
There are various security updates throughout the commit, along with a few bug fixes; I'll try to name them here. --- Bug #453: Fixed. Bug #485: Duplicate of #453, but still fixed. Bug #476: Ok, the typo is fixed. --- That should be it, but I'll have more fixes tomorrow. (Finally, I have figured out regular expressions!!!) --Doug git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2645 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -69,12 +69,13 @@ function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
|
||||
|
||||
function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
|
||||
{
|
||||
$avatar_filename = rawurlencode($avatar_filename);
|
||||
if ( !preg_match('#^http:\/\/#i', $avatar_filename) )
|
||||
{
|
||||
$avatar_filename = 'http://' . $avatar_filename;
|
||||
}
|
||||
|
||||
if ( !preg_match('#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/[^\"]*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
|
||||
if ( !preg_match('#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
|
||||
{
|
||||
$error = true;
|
||||
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
|
||||
|
Reference in New Issue
Block a user