4
0
Эх сурвалжийг харах

prevent organizrHash from being displayed via API

CauseFX 4 жил өмнө
parent
commit
c0e8805a45

+ 5 - 1
api/functions/config-functions.php

@@ -5,7 +5,11 @@ trait ConfigFunctions
 	public function getConfigItem($item)
 	public function getConfigItem($item)
 	{
 	{
 		if ($this->config[$item]) {
 		if ($this->config[$item]) {
-			$this->setAPIResponse('success', null, 200, $this->config[$item]);
+			$configItem = $this->config[$item];
+			if ($item == 'organizrHash') {
+				$configItem = '***Secure***';
+			}
+			$this->setAPIResponse('success', null, 200, $configItem);
 			return $this->config[$item];
 			return $this->config[$item];
 		} else {
 		} else {
 			$this->setAPIResponse('error', $item . ' is not defined or is blank', 404);
 			$this->setAPIResponse('error', $item . ' is not defined or is blank', 404);