From 0827d8153a3ab37992c129378f94b212a441138a Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Wed, 11 Oct 2017 13:16:35 -0600 Subject: [PATCH] Obscure mobile auth keys in log --- mobile/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mobile/index.php b/mobile/index.php index 55b42e0..1afb987 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -38,6 +38,13 @@ if ($user_key_valid !== TRUE) { die(json_encode(["status" => "ERROR", "msg" => "Invalid username and/or access key."])); } +// Obscure key +if (strlen($key) > 7) { + for ($i = 3; $i < strlen($key) - 3; $i++) { + $key[$i] = "*"; + } +} + // Process the action switch ($VARS['action']) { case "check_key":