aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-06-09 18:56:13 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-06-09 18:56:13 +0200
commitb8151b1299c02506ffa0d665461d85e32cd4cd10 (patch)
treecdf07e1fe1e5721e034734ba28b05f780f1f63ed /phpBB/posting.php
parent89f70673779f1908c8f000c5c053bb377e253254 (diff)
downloadforums-b8151b1299c02506ffa0d665461d85e32cd4cd10.tar
forums-b8151b1299c02506ffa0d665461d85e32cd4cd10.tar.gz
forums-b8151b1299c02506ffa0d665461d85e32cd4cd10.tar.bz2
forums-b8151b1299c02506ffa0d665461d85e32cd4cd10.tar.xz
forums-b8151b1299c02506ffa0d665461d85e32cd4cd10.zip
[ticket/11711] Improve checks for unsupported characters and check subject
PHPBB3-11711
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 60bb595da6..fc407caf69 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1028,6 +1028,14 @@ if ($submit || $preview || $refresh)
$error[] = $user->lang['EMPTY_SUBJECT'];
}
+ // Check for out-of-bounds characters that are currently
+ // not supported by utf8_bin
+ if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
+ {
+ $character_list = implode('<br />', $matches[0]);
+ $error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list);
+ }
+
$post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;
if ($post_data['poll_option_text'] &&