From 29bdd2fba21ec9cd3523894cb1fabf5fd962d387 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 4 Jun 2022 11:10:45 -0700 Subject: [PATCH] fix token check --- lib/helpers.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/helpers.php b/lib/helpers.php index a18ddf1..3981e43 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -34,6 +34,9 @@ function is_authenticated($params) { return false; $valid_tokens = array_filter(file($token_file)); + array_walk($valid_tokens, function(&$val) { + $val = trim($val); + }); if(in_array($params['token'], $valid_tokens)) return true;