From 2828dfc8709904fa91a8d9454f68a10f0fb1e399 Mon Sep 17 00:00:00 2001 From: Estratos Consulting Date: Thu, 24 Jul 2014 05:46:08 -0600 Subject: [PATCH] Update index.php Comments about error coming from setting PHP Directive Display Errors to ON Initializing arg1, arg2, ...arg9 ='' may be useful to avoid this problem when calling the API from a script Error logic may break when you get this notifies on the response --- web/api/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/api/index.php b/web/api/index.php index 4ea052279..458342838 100644 --- a/web/api/index.php +++ b/web/api/index.php @@ -26,7 +26,10 @@ if (isset($_POST['user']) || isset($_POST['hash'])) { echo 'Error: only admin is allowed to use API'; exit; } - + // Not Declaring arguments may cause Notifies on the response on an API Call when the Directive Dysplay errors is enabled + // you may initialize argument arg1, arg2,... arg9 to = '' here + // Or post the unused args to ='' + // Prepare arguments if (isset($_POST['cmd'])) $cmd = escapeshellarg($_POST['cmd']); if (isset($_POST['arg1'])) $arg1 = escapeshellarg($_POST['arg1']);