diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2015-04-06 21:32:22 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-04-24 13:31:37 +0200 |
commit | 245d042e43374e6467f447507783a68fae186ef1 (patch) | |
tree | 3e19ce8c054da4d7f250fc4a6f5633b493c4784e /phpBB | |
parent | 2fa99602c6f6431e99468ca13f4a58344a401c24 (diff) | |
download | forums-245d042e43374e6467f447507783a68fae186ef1.tar forums-245d042e43374e6467f447507783a68fae186ef1.tar.gz forums-245d042e43374e6467f447507783a68fae186ef1.tar.bz2 forums-245d042e43374e6467f447507783a68fae186ef1.tar.xz forums-245d042e43374e6467f447507783a68fae186ef1.zip |
[ticket/8672] Updated the text_formatter.s9e service
PHPBB3-8672
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/parser.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index 77328ee4d9..0582f235e0 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -367,7 +367,6 @@ class parser implements \phpbb\textformatter\parser_interface { // Validate the URL $url = BuiltInFilters::filterUrl($url, $url_config, $logger); - if ($url === false) { return false; @@ -375,26 +374,23 @@ class parser implements \phpbb\textformatter\parser_interface if ($max_height || $max_width) { - $stats = @getimagesize($url); - - if ($stats === false) + $imagesize = new \phpbb\upload\imagesize(); + $size_info = $imagesize->get_imagesize($url); + if ($size_info === false) { $logger->err('UNABLE_GET_IMAGE_SIZE'); - return false; } - if ($max_height && $max_height < $stats[1]) + if ($max_height && $max_height < $size_info['height']) { $logger->err('MAX_IMG_HEIGHT_EXCEEDED', array('max_height' => $max_height)); - return false; } - if ($max_width && $max_width < $stats[0]) + if ($max_width && $max_width < $size_info['width']) { $logger->err('MAX_IMG_WIDTH_EXCEEDED', array('max_width' => $max_width)); - return false; } } |