diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-09-22 09:48:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 09:48:42 +0300 |
commit | 92383fa1158da049bb0109833506c6bedcb205ea (patch) | |
tree | bf9bd490c368e0441e3e2c8475f315c75755d12a /lib | |
parent | 5a941eb5519b343be7065aaba89d1b77b21691d0 (diff) | |
parent | e110129acb6f9ad65df4315480a88053975009c3 (diff) |
Merge pull request #7924 from nextcloud/fix-room-length
Fix room length to make compatible with database length
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/RoomController.php | 2 | ||||
-rw-r--r-- | lib/Service/RoomService.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 7568e59af..b9c36c684 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -869,7 +869,7 @@ class RoomController extends AEnvironmentAwareController { $roomName = trim($roomName); - if ($roomName === '' || strlen($roomName) > 200) { + if ($roomName === '' || mb_strlen($roomName) > 255) { return new DataResponse([], Http::STATUS_BAD_REQUEST); } diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index d083bfb5f..644595784 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -132,7 +132,7 @@ class RoomService { */ public function createConversation(int $type, string $name, ?IUser $owner = null, string $objectType = '', string $objectId = ''): Room { $name = trim($name); - if ($name === '' || isset($name[255])) { + if ($name === '' || mb_strlen($name) > 255) { throw new InvalidArgumentException('name'); } |