From bc7f1d78df0441f5c2a2ea5361623f6bcce3a60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 21 Apr 2013 20:30:06 +0200 Subject: [PATCH] Fix length validation --- file/lib/data/message/MessageAction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file/lib/data/message/MessageAction.class.php b/file/lib/data/message/MessageAction.class.php index 89eee79..dfae9fa 100644 --- a/file/lib/data/message/MessageAction.class.php +++ b/file/lib/data/message/MessageAction.class.php @@ -63,7 +63,7 @@ public function validateSend() { $this->parameters['enableHTML'] = false; // validate text - if (strlen($this->parameters['text']) > CHAT_MAX_LENGTH) throw new UserInputException('text', 'tooLong'); + if (StringUtil::length($this->parameters['text']) > CHAT_MAX_LENGTH) throw new UserInputException('text', 'tooLong'); // search for disallowed bbcodes $disallowedBBCodes = \wcf\system\bbcode\BBCodeParser::getInstance()->validateBBCodes($this->parameters['text'], explode(',', WCF::getSession()->getPermission('user.chat.allowedBBCodes')));