aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-06-07 13:42:06 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-06-07 13:42:06 +0000
commit7524ca52497a05b9079983c0fc7239a7e6e9a643 (patch)
tree029c70bb88abed82d979074f7dc5d48f96bc68ff /phpBB/includes/message_parser.php
parent4dddc3a13093862bc70c1320bd310311246cb7bb (diff)
downloadforums-7524ca52497a05b9079983c0fc7239a7e6e9a643.tar
forums-7524ca52497a05b9079983c0fc7239a7e6e9a643.tar.gz
forums-7524ca52497a05b9079983c0fc7239a7e6e9a643.tar.bz2
forums-7524ca52497a05b9079983c0fc7239a7e6e9a643.tar.xz
forums-7524ca52497a05b9079983c0fc7239a7e6e9a643.zip
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/trunk@8614 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 286ccd8152..d9c5dbaa31 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'])
{