From af09f5f97736a1857f1545a8cce013d4ca251360 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sat, 30 Dec 2017 12:50:18 -0600 Subject: [PATCH] limit api key to 12 chars --- app/Facades/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Facades/Utils.php b/app/Facades/Utils.php index 122c89e3..2fe0eb31 100644 --- a/app/Facades/Utils.php +++ b/app/Facades/Utils.php @@ -17,7 +17,7 @@ class Utils extends Facade */ public static function generateApiKey() { - $key = sha1(time() . mt_rand()); + $key = substr(0, 12, sha1(time() . mt_rand())); return $key; }