Quellcode durchsuchen

add clarification to checkRoute error message

CauseFX vor 5 Jahren
Ursprung
Commit
243ad6f294
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      api/classes/organizr.class.php

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

@@ -260,7 +260,7 @@ class Organizr
 		$data = $this->apiData($request);
 		$data = $this->apiData($request);
 		if (!in_array($route, $GLOBALS['bypass'])) {
 		if (!in_array($route, $GLOBALS['bypass'])) {
 			if ($this->isApprovedRequest($method, $data) === false) {
 			if ($this->isApprovedRequest($method, $data) === false) {
-				$this->setAPIResponse('error', 'Not authorized', 401);
+				$this->setAPIResponse('error', 'Not authorized for current Route: ' . $route, 401);
 				$this->writeLog('success', 'Killed Attack From [' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'No Referer') . ']', $this->user['username']);
 				$this->writeLog('success', 'Killed Attack From [' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'No Referer') . ']', $this->user['username']);
 				return false;
 				return false;
 			}
 			}