Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas

This commit is contained in:
Isaac Connor 2017-05-05 16:52:38 -04:00
commit 1b0a03c723
1 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ switch ( $data['type'] )
session_start();
$time = time();
// Regenerate auth hash after half the lifetime of the hash
if ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) {
if ( (!isset($_SESSION['AuthHashGeneratedAt'])) or ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) ) {
$data['auth'] = generateAuthHash( ZM_AUTH_HASH_IPS );
}
session_write_close();
@ -134,7 +134,7 @@ switch ( $data['type'] )
session_start();
$time = time();
// Regenerate auth hash after half the lifetime of the hash
if ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) {
if ( (!isset($_SESSION['AuthHashGeneratedAt'])) or ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) ) {
$data['auth'] = generateAuthHash( ZM_AUTH_HASH_IPS );
}
session_write_close();