We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32c4dea commit ccaf0f6Copy full SHA for ccaf0f6
main/webservices/api/v2.php
@@ -23,6 +23,20 @@
23
24
$httpRequest = HttpRequest::createFromGlobals();
25
26
+$jsonContent = 'application/json' === $httpRequest->headers->get('Content-Type')
27
+ ? json_decode($httpRequest->getContent(), true)
28
+ : null;
29
+
30
+if ($jsonContent) {
31
+ foreach ($jsonContent as $key => $value) {
32
+ $value = Security::remove_XSS($value);
33
34
+ $httpRequest->query->set($key, $value);
35
+ $httpRequest->request->set($key, $value);
36
+ $httpRequest->overrideGlobals();
37
+ }
38
+}
39
40
$hash = $httpRequest->query->get('hash');
41
42
if ($hash) {
0 commit comments