From d18e5473327fe7edf1fdaec13db8a9079a2168ac Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sat, 10 Aug 2019 21:02:39 +0200 Subject: [ticket/15897] Fix Emojis' SQL Error in Attachment Comment PHPBB3-15897 --- phpBB/includes/functions_posting.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index c5a7400ddf..2cce77e092 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2079,6 +2079,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data continue; } + if (preg_match('/[\x{10000}-\x{10FFFF}]/u', $attach_row['attach_comment'])) + { + trigger_error('ATTACH_COMMENT_NO_EMOJIS'); + } + if (!$attach_row['is_orphan']) { // update entry in db if attachment already stored in db and filespace -- cgit v1.2.1