Fix auth by hash
This commit is contained in:
parent
5cd37adad4
commit
a6ee817bc4
|
@ -275,8 +275,9 @@ User *zmLoadAuthUser(const char *auth, bool use_remote_addr) {
|
||||||
const char *user = dbrow[1];
|
const char *user = dbrow[1];
|
||||||
const char *pass = dbrow[2];
|
const char *pass = dbrow[2];
|
||||||
|
|
||||||
for ( unsigned int i = 0; i < hours; i++, now -= 3600 ) {
|
time_t our_now = now;
|
||||||
struct tm *now_tm = localtime(&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",
|
snprintf(auth_key, sizeof(auth_key)-1, "%s%s%s%s%d%d%d%d",
|
||||||
config.auth_hash_secret,
|
config.auth_hash_secret,
|
||||||
|
|
Loading…
Reference in New Issue