diff options
Diffstat (limited to 'lib/Controller/ChatController.php')
-rw-r--r-- | lib/Controller/ChatController.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php index af9e13b31..10a807659 100644 --- a/lib/Controller/ChatController.php +++ b/lib/Controller/ChatController.php @@ -288,6 +288,11 @@ class ChatController extends AEnvironmentAwareController { return new DataResponse([], Http::STATUS_BAD_REQUEST); } + if ($data['type'] === 'geo-location' + && !preg_match(ChatManager::GEO_LOCATION_VALIDATOR, $data['id'])) { + return new DataResponse([], Http::STATUS_BAD_REQUEST); + } + $this->participantService->ensureOneToOneRoomIsFilled($this->room); $creationDateTime = $this->timeFactory->getDateTime('now', new \DateTimeZone('UTC')); |