Bläddra i källkod

cleaner requesterToken

CauseFX 4 år sedan
förälder
incheckning
01badbbb8b
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      api/classes/organizr.class.php

+ 1 - 1
api/classes/organizr.class.php

@@ -4266,7 +4266,7 @@ class Organizr
 	
 	
 	public function isApprovedRequest($method, $data)
 	public function isApprovedRequest($method, $data)
 	{
 	{
-		$requesterToken = isset($this->getallheaders()['Token']) ? $this->getallheaders()['Token'] : (isset($_GET['apikey']) ? $_GET['apikey'] : false);
+		$requesterToken = $this->getallheaders()['Token'] ?? ($_GET['apikey'] ?? false);
 		$apiKey = ($this->config['organizrAPI']) ?? null;
 		$apiKey = ($this->config['organizrAPI']) ?? null;
 		if (isset($data['formKey'])) {
 		if (isset($data['formKey'])) {
 			$formKey = $data['formKey'];
 			$formKey = $data['formKey'];