diff options
author | Nils Adermann <naderman@naderman.de> | 2010-11-20 17:56:17 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-11-20 17:56:17 +0100 |
commit | 67593824d43a081d9b9301bcd40a32a17c5504a7 (patch) | |
tree | 1b643fd394ef3f9fd54fdfce54f73863a1c0b819 /phpBB/includes/message_parser.php | |
parent | 635752fafc275c091cfc130e2f7b5e2ca5fe91d5 (diff) | |
parent | d2778e67eaff5453042e6fd851b7d678141be58d (diff) | |
download | forums-67593824d43a081d9b9301bcd40a32a17c5504a7.tar forums-67593824d43a081d9b9301bcd40a32a17c5504a7.tar.gz forums-67593824d43a081d9b9301bcd40a32a17c5504a7.tar.bz2 forums-67593824d43a081d9b9301bcd40a32a17c5504a7.tar.xz forums-67593824d43a081d9b9301bcd40a32a17c5504a7.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[prep-release-3.0.8] Incrementing version number to 3.0.8 and update changelog
[ticket/9903] Script for detecting potentially malicious flash bbcodes
[ticket/9904] Update WebPI Parameters.xml to work with WebMatrix.
[ticket/9903] Fix XSS in BBcode-parser's Flash-BBcode.
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index e0b2bb1496..12d8789b59 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -352,6 +352,15 @@ class bbcode_firstpass extends bbcode return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]'; } + $in = str_replace(' ', '%20', $in); + + // Make sure $in is a URL. + if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) && + !preg_match('#^' . get_preg_expression('www_url') . '$#i', $in)) + { + 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']) { |