]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only check mb_strlen()
authorJoas Schilling <coding@schilljs.com>
Mon, 17 Jan 2022 11:03:27 +0000 (12:03 +0100)
committerVitor Mattos <vitor@php.rio>
Fri, 21 Jan 2022 11:39:40 +0000 (08:39 -0300)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Comments/Manager.php

index a4afffe2cd446e268898af6ec3f03557b58c5fe2..84e1a6a3cb49574d9c9b6a9e39b5f9124ce3fabf 100644 (file)
@@ -148,7 +148,7 @@ class Manager implements ICommentsManager {
                        throw new \UnexpectedValueException('Actor, Object and Verb information must be provided for saving');
                }
 
-               if ($comment->getVerb() === 'reaction' && strlen($comment->getMessage()) > 8) {
+               if ($comment->getVerb() === 'reaction' && mb_strlen($comment->getMessage()) > 8) {
                        throw new \UnexpectedValueException('Reactions cannot be longer than 8 bytes');
                }