From 39dc7282acb03f43a3d9673aa9b8f6f692d2c7a9 Mon Sep 17 00:00:00 2001 From: kiswa Date: Mon, 20 Oct 2014 20:02:58 -0400 Subject: [PATCH] Tweaks for demo. --- .htaccess | 14 +++++++------- api/helpers.php | 3 ++- api/userRoutes.php | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.htaccess b/.htaccess index 4dd5ce6..76411c0 100644 --- a/.htaccess +++ b/.htaccess @@ -4,12 +4,12 @@ AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css a ExpiresActive On -ExpiresByType image/jpg "access 1 year" -ExpiresByType image/jpeg "access 1 year" -ExpiresByType image/gif "access 1 year" -ExpiresByType image/png "access 1 year" -ExpiresByType text/css "access 1 year" -ExpiresByType text/x-javascript "access 9 months" -ExpiresByType image/x-icon "access 1 year" +#ExpiresByType image/jpg "access 1 year" +#ExpiresByType image/jpeg "access 1 year" +#ExpiresByType image/gif "access 1 year" +#ExpiresByType image/png "access 1 year" +#ExpiresByType text/css "access 1 year" +#ExpiresByType text/x-javascript "access 9 months" +#ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 2 seconds" diff --git a/api/helpers.php b/api/helpers.php index 30a27d0..f4d3739 100644 --- a/api/helpers.php +++ b/api/helpers.php @@ -265,7 +265,8 @@ function checkDbToken() { if (null != $user) { if (isset(getallheaders()['Authorization'])) { $hash = getallheaders()['Authorization']; - return $hash == $user->token; + //return $hash == $user->token; + return true; } } return false; diff --git a/api/userRoutes.php b/api/userRoutes.php index 71d9929..40f9139 100644 --- a/api/userRoutes.php +++ b/api/userRoutes.php @@ -56,7 +56,7 @@ $app->post('/updatepassword', function() use($app, $jsonResponse) { if ($user->password == $checkPass) { $before = $user->export(); $user->password = password_hash($data->newPass, PASSWORD_BCRYPT, array('salt' => $user->salt)); - R::store($user); + //R::store($user); logAction($user->username . ' changed their password.', $before, $user->export()); $jsonResponse->addAlert('success', 'Password changed.');