From 9b4124ac1f1346c284197d885f38d52516b884cf Mon Sep 17 00:00:00 2001 From: dev-chiefworks Date: Wed, 13 Apr 2022 18:56:12 -0400 Subject: [PATCH] fix --- app/Controllers/Savvy.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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;