aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Http
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-12-20 08:58:33 +0100
committerGitHub <noreply@github.com>2022-12-20 08:58:33 +0100
commit0af4e9d4fe80ad3cffc6f3ff6a3d19d5f808cba9 (patch)
treeb91084689580200f48e77f50d0d2b7efae0c893f /lib/private/AppFramework/Http
parentfcf5789916e914613addd7d7fe32cf50bfd614ae (diff)
parent7dcd6eb561f4bba7ed36ce1178c725278dd9b80e (diff)
downloadnextcloud-server-0af4e9d4fe80ad3cffc6f3ff6a3d19d5f808cba9.tar.gz
nextcloud-server-0af4e9d4fe80ad3cffc6f3ff6a3d19d5f808cba9.zip
Merge pull request #34172 from audriga/add-scim-json-support
Add support for application/scim+json
Diffstat (limited to 'lib/private/AppFramework/Http')
-rw-r--r--lib/private/AppFramework/Http/Request.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 32cce8a88e1..d8aac063f3e 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -26,6 +26,7 @@ declare(strict_types=1);
* @author Thomas Tanghus <thomas@tanghus.net>
* @author Vincent Petry <vincent@nextcloud.com>
* @author Simon Leiner <simon@leiner.me>
+ * @author Stanimir Bozhilov <stanimir@audriga.com>
*
* @license AGPL-3.0
*
@@ -419,8 +420,8 @@ class Request implements \ArrayAccess, \Countable, IRequest {
}
$params = [];
- // 'application/json' must be decoded manually.
- if (strpos($this->getHeader('Content-Type'), 'application/json') !== false) {
+ // 'application/json' and other JSON-related content types must be decoded manually.
+ if (preg_match(self::JSON_CONTENT_TYPE_REGEX, $this->getHeader('Content-Type')) === 1) {
$params = json_decode(file_get_contents($this->inputStream), true);
if (\is_array($params) && \count($params) > 0) {
$this->items['params'] = $params;