We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b09bfd2 commit 6df127dCopy full SHA for 6df127d
1 file changed
system/Security/Security.php
@@ -221,7 +221,7 @@ public function CSRFVerify(RequestInterface $request)
221
$CSRFTokenValue = $_POST[$this->CSRFTokenName] ??
222
(!is_null($request->getHeader($this->CSRFHeaderName)) && !empty($request->getHeader($this->CSRFHeaderName)->getValue()) ?
223
$request->getHeader($this->CSRFHeaderName)->getValue() :
224
- (!empty(file_get_contents('php://input')) && !empty($json = json_decode(file_get_contents('php://input'))) && json_last_error() === JSON_ERROR_NONE ?
+ (!empty($request->getBody()) && !empty($json = json_decode($request->getBody())) && json_last_error() === JSON_ERROR_NONE ?
225
($json->{$this->CSRFTokenName} ?? null) :
226
null));
227
0 commit comments