Fix auth by hash

This commit is contained in:
Isaac Connor 2020-04-28 19:00:42 -04:00
parent 5cd37adad4
commit a6ee817bc4
1 changed files with 3 additions and 2 deletions

View File

@ -275,8 +275,9 @@ User *zmLoadAuthUser(const char *auth, bool use_remote_addr) {
const char *user = dbrow[1];
const char *pass = dbrow[2];
for ( unsigned int i = 0; i < hours; i++, now -= 3600 ) {
struct tm *now_tm = localtime(&now);
time_t our_now = now;
for ( unsigned int i = 0; i < hours; i++, our_now -= 3600 ) {
struct tm *now_tm = localtime(&our_now);
snprintf(auth_key, sizeof(auth_key)-1, "%s%s%s%s%d%d%d%d",
config.auth_hash_secret,