diff --git a/app/Controllers/Savvy.php b/app/Controllers/Savvy.php index 75adea3..33b71df 100644 --- a/app/Controllers/Savvy.php +++ b/app/Controllers/Savvy.php @@ -114,6 +114,15 @@ class Savvy extends BaseController // log_message('critical', json_encode($in) ); // log_message('critical', json_encode($_POST) ); $inx = $_POST; + + // Decrypt the input + if (isset($inx['encrypted_payload'])) { + $payload = openssl_decrypt(hex2bin($inx['encrypted_payload']), $encryptionAlg, $encryptionKey, OPENSSL_RAW_DATA, $encryptionIV); + unset($inx['encrypted_payload']); + $inx = array_merge($in, json_decode($payload, true)); + } + + switch ($endpoint) { case 'getdrycleanservicelist': $in["action"] = SAVVYEXT_USER_DRYCLIST; break;