Ver Fonte

prevent organizrHash from being displayed via API

CauseFX há 4 anos atrás
pai
commit
c0e8805a45
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      api/functions/config-functions.php

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

@@ -5,7 +5,11 @@ trait ConfigFunctions
 	public function getConfigItem($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];
 		} else {
 			$this->setAPIResponse('error', $item . ' is not defined or is blank', 404);