diff options
author | Joas Schilling <coding@schilljs.com> | 2021-09-13 14:10:05 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-09-17 09:53:10 +0300 |
commit | 11903a58d39438099be4472549f8feb6f28f0a56 (patch) | |
tree | 211f4e74df570f76570971da3b98b29abfee704b /lib/Chat/ChatManager.php | |
parent | e1b24233569744c9920689921c9cd79509d0a436 (diff) |
Add some validation to the geo location id
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Chat/ChatManager.php')
-rw-r--r-- | lib/Chat/ChatManager.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Chat/ChatManager.php b/lib/Chat/ChatManager.php index c7de834b3..627af40fa 100644 --- a/lib/Chat/ChatManager.php +++ b/lib/Chat/ChatManager.php @@ -62,6 +62,8 @@ class ChatManager { public const MAX_CHAT_LENGTH = 32000; + public const GEO_LOCATION_VALIDATOR = '/^geo:-?\d{1,2}(\.\d+)?,-?\d{1,3}(\.\d+)?(,-?\d+(\.\d+)?)?(;crs=wgs84)?(;u=\d+(\.\d+)?)?$/i'; + /** @var ICommentsManager */ private $commentsManager; /** @var IEventDispatcher */ |