diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-01-19 19:19:22 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-01-19 19:19:22 +0100 |
commit | afd1ddb0eab16a74d1bfad0af95e623abd8c486a (patch) | |
tree | 6230f26c60baa3f86ba4ee872b366343ffb45183 /apps/dav/lib/Comments | |
parent | d42d8b79e0c83f57336b9c135711e33d9c9afa5f (diff) | |
download | nextcloud-server-afd1ddb0eab16a74d1bfad0af95e623abd8c486a.tar.gz nextcloud-server-afd1ddb0eab16a74d1bfad0af95e623abd8c486a.zip |
chore(dav): Make json_encode and json_decode throw on error
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/Comments')
-rw-r--r-- | apps/dav/lib/Comments/CommentsPlugin.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index a4932751897..f31e479c212 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/apps/dav/lib/Comments/CommentsPlugin.php @@ -220,7 +220,7 @@ class CommentsPlugin extends ServerPlugin { */ private function createComment($objectType, $objectId, $data, $contentType = 'application/json') { if (explode(';', $contentType)[0] === 'application/json') { - $data = json_decode($data, true); + $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR); } else { throw new UnsupportedMediaType(); } |