aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter/s9e
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-07-16 20:44:12 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-07-16 20:44:12 +0200
commitb5a997ce183fa655af4c03b5f92a58a1a3e7c2f1 (patch)
tree5deb6636fbb70c98632d21858374c3ba1bc35296 /phpBB/phpbb/textformatter/s9e
parent9e9bdb69b5e00a4993b7ff9a6021044c9ec0c4dc (diff)
downloadforums-b5a997ce183fa655af4c03b5f92a58a1a3e7c2f1.tar
forums-b5a997ce183fa655af4c03b5f92a58a1a3e7c2f1.tar.gz
forums-b5a997ce183fa655af4c03b5f92a58a1a3e7c2f1.tar.bz2
forums-b5a997ce183fa655af4c03b5f92a58a1a3e7c2f1.tar.xz
forums-b5a997ce183fa655af4c03b5f92a58a1a3e7c2f1.zip
[ticket/security/243] Limit size values to supported values
SECURITY-243
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e')
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index 3698dca224..e30bc2b0d9 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -228,6 +228,10 @@ class parser implements \phpbb\textformatter\parser_interface
{
$errors[] = array($msg);
}
+ else if ($msg === 'INVALID_FONT_SIZE')
+ {
+ $errors[] = [$msg, $context['invalid_size']];
+ }
}
// Deduplicate error messages. array_unique() only works on strings so we have to serialize
@@ -335,6 +339,13 @@ class parser implements \phpbb\textformatter\parser_interface
*/
static public function filter_font_size($size, $max_size, Logger $logger)
{
+ if (!is_int($size))
+ {
+ $logger->err('INVALID_FONT_SIZE', ['invalid_size' => htmlspecialchars($size)]);
+
+ return false;
+ }
+
if ($max_size && $size > $max_size)
{
$logger->err('MAX_FONT_SIZE_EXCEEDED', array('max_size' => $max_size));