aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-08-23 16:39:19 +0200
committerGravatar GitHub <noreply@github.com> 2024-08-23 16:39:19 +0200
commit3c2167d60b22032956e39fa536cc7684126a5b54 (patch)
tree40d59c2ef5c25e015f5c663e76007a63147e5423 /lib
parentca28c90f8bf1603594a1489bdeefd2d72e7e18bb (diff)
Charset for JSON exchanges (#6710)
Apply some minor recommendations from Snyk scanner
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Request.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index 8121eb104..63464e8f1 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -440,7 +440,7 @@ class Minz_Request {
* Allows receiving POST data as application/json
*/
private static function initJSON(): void {
- if ('application/json' !== self::extractContentType()) {
+ if (!str_starts_with(self::extractContentType(), 'application/json')) {
return;
}
$ORIGINAL_INPUT = file_get_contents('php://input', false, null, 0, 1048576);