Tweaks for demo.

This commit is contained in:
kiswa 2014-10-20 20:02:58 -04:00
parent d93c5f7924
commit 39dc7282ac
3 changed files with 10 additions and 9 deletions

View File

@ -4,12 +4,12 @@ AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css a
<IfModule mod_expires.c>
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"
</IfModule>

View File

@ -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;

View File

@ -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.');