mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Well, seems that many hosts are in a business in which they shouldn't be in. Lessen the impact for their customers by allowing to do without getimagesize for remote avatatars.
#13531 git-svn-id: file:///svn/phpbb/trunk@7899 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -252,6 +252,8 @@ p a {
|
||||
<li>[Fix] Handle forum links/redirects within viewforum if no read permission given (to display login box or error message) (Bug #13467)</li>
|
||||
<li>[Fix] Prevent changing postable forum having subforums to link forum without moving subforums out first</li>
|
||||
<li>[Fix] Do not display version in admin template (Bug #13495)</li>
|
||||
<li>[Fix] Allow manual specification of remote avatar dimensions if getimagesize is disabled (Bug #13531)</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
@@ -1820,13 +1820,13 @@ function avatar_remote($data, &$error)
|
||||
}
|
||||
|
||||
// Make sure getimagesize works...
|
||||
if (($image_data = @getimagesize($data['remotelink'])) === false)
|
||||
if (($image_data = @getimagesize($data['remotelink'])) === false && (empty($data['width']) || empty($data['height'])))
|
||||
{
|
||||
$error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($image_data[0] < 2 || $image_data[1] < 2)
|
||||
if (!empty($image_data) && ($image_data[0] < 2 || $image_data[1] < 2))
|
||||
{
|
||||
$error[] = $user->lang['AVATAR_NO_SIZE'];
|
||||
return false;
|
||||
@@ -1846,7 +1846,7 @@ function avatar_remote($data, &$error)
|
||||
$types = fileupload::image_types();
|
||||
$extension = strtolower(filespec::get_extension($data['remotelink']));
|
||||
|
||||
if (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]]))
|
||||
if (!empty($image_data) && (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]])))
|
||||
{
|
||||
if (!isset($types[$image_data[2]]))
|
||||
{
|
||||
|
Reference in New Issue
Block a user