From cf8eef783b46bd537dce77952f19549c21968d89 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 7 Jun 2008 13:40:37 +0000 Subject: [PATCH] do not allow [flash=0,0]... not implemented for images due to the reliance on getimagesize() - as usual both sizes are able to be limited by the maximum/minimum image size configuration options git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8613 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 674e13de49..6c12903999 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -346,6 +346,12 @@ class bbcode_firstpass extends bbcode $in = trim($in); $error = false; + // Do not allow 0-sizes generally being entered + if ($width <= 0 || $height <= 0) + { + return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]'; + } + // Apply the same size checks on flash files as on images if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width']) {