This commit is contained in:
dev-chiefworks
2022-04-13 19:42:09 -04:00
parent ffb1668a1f
commit 18da33c986
+5 -4
View File
@@ -32,6 +32,7 @@ class Savvy extends BaseController
}; };
*/ */
$inx=[];
$encryptionAlg = "aes-256-ctr"; // $savvyext->cfgReadChar('encryption.algorithm'); $encryptionAlg = "aes-256-ctr"; // $savvyext->cfgReadChar('encryption.algorithm');
$encryptionKey = "1234567890abcdef1234567890abcdef"; // $savvyext->cfgReadChar('encryption.key'); $encryptionKey = "1234567890abcdef1234567890abcdef"; // $savvyext->cfgReadChar('encryption.key');
$encryptionIV = "1234567890abcdef"; // $savvyext->cfgReadChar('encryption.iv'); $encryptionIV = "1234567890abcdef"; // $savvyext->cfgReadChar('encryption.iv');
@@ -113,10 +114,10 @@ class Savvy extends BaseController
$raw_json = file_get_contents("php://input"); $raw_json = file_get_contents("php://input");
$raw_array = json_decode($raw_json, true); $raw_array = json_decode($raw_json, true);
if ($endpoint == "createuser") { if ($endpoint == "createuser") {
$in = $raw_array; $inx = $raw_array;
} else { } else {
$in = $this->flatten($raw_array); $inx = $this->flatten($raw_array);
$this->logArray($in); $this->logArray($inx);
} }
} }
} }
@@ -134,7 +135,7 @@ class Savvy extends BaseController
// log_message('critical', json_encode($in) ); // log_message('critical', json_encode($in) );
// log_message('critical', json_encode($_POST) ); // log_message('critical', json_encode($_POST) );
$inx = $_POST; // $inx = $_POST;
$this->logArray($inx); $this->logArray($inx);
// Decrypt the input // Decrypt the input
if (isset($inx['encrypted_payload'])) { if (isset($inx['encrypted_payload'])) {