diff options
author | Scott Dutton <scott@exussum.co.uk> | 2016-02-03 05:33:45 +0000 |
---|---|---|
committer | Scott Dutton <scott@exussum.co.uk> | 2016-02-03 05:33:45 +0000 |
commit | 366a92c36ae988706565e1fa02f8808a0241e916 (patch) | |
tree | cf4440268d8c61adf0d83c56a13e11a9f08aa449 /phpBB/includes/functions_upload.php | |
parent | 610048cc6d3e59297391b18493805057843a2aa4 (diff) | |
download | forums-366a92c36ae988706565e1fa02f8808a0241e916.tar forums-366a92c36ae988706565e1fa02f8808a0241e916.tar.gz forums-366a92c36ae988706565e1fa02f8808a0241e916.tar.bz2 forums-366a92c36ae988706565e1fa02f8808a0241e916.tar.xz forums-366a92c36ae988706565e1fa02f8808a0241e916.zip |
[ticket/14430] Remote avatar uploading
Remove support for redirects
PHPBB3-14431
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r-- | phpBB/includes/functions_upload.php | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 79f561c170..727d177344 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -752,11 +752,10 @@ class fileupload * * @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif * @param \phpbb\mimetype\guesser $mimetype_guesser Mimetype guesser - * @param int $redirect_count the current count of redirects * @return object $file Object "filespec" is returned, all further operations can be done with this object * @access public */ - function remote_upload($upload_url, \phpbb\mimetype\guesser $mimetype_guesser = null, $redirect_count = 0) + function remote_upload($upload_url, \phpbb\mimetype\guesser $mimetype_guesser = null) { global $user, $phpbb_root_path; @@ -909,21 +908,6 @@ class fileupload $file = new fileerror($user->lang[$this->error_prefix . 'URL_NOT_FOUND']); return $file; } - else if (stripos($line, 'location: ') !== false) - { - //there is a redirect, follow up to 5 - if ($redirect_count >= 5) - { - $file = new fileerror($user->lang[$this->error_prefix . 'URL_NOT_FOUND']); - return $file; - } - - $upload_url = rtrim(str_replace('location: ', '', strtolower($line))); - //close the current connection, lets not leave dangeling connections open - @fclose($fsock); - - return $this->remote_upload($upload_url, $mimetype_guesser, ++$redirect_count); - } } } |