Browse Source

[multiple] use binary '|' to reconstruct ts

master
Glenn Strauss 9 months ago
parent
commit
8b52995c1d
  1. 2
      src/mod_auth.c
  2. 2
      src/mod_secdownload.c

2
src/mod_auth.c

@ -1386,7 +1386,7 @@ static handler_t mod_auth_check_digest(request_st * const r, void *p_d, const st
time_t ts = 0;
const unsigned char * const nonce_uns = (unsigned char *)nonce;
for (i = 0; i < 8 && light_isxdigit(nonce_uns[i]); ++i) {
ts =(time_t)((uint32_t)ts << 4) + hex2int(nonce_uns[i]);
ts =(time_t)((uint32_t)ts << 4) | hex2int(nonce_uns[i]);
}
const time_t cur_ts = log_epoch_secs;
if (nonce[i] != ':'

2
src/mod_secdownload.c

@ -444,7 +444,7 @@ URIHANDLER_FUNC(mod_secdownload_uri_handler) {
if (*(ts_str + 8) != '/') return HANDLER_GO_ON;
for (i = 0; i < 8; i++) {
ts = (time_t)((uint32_t)ts << 4) + hex2int(ts_str[i]);
ts = (time_t)((uint32_t)ts << 4) | hex2int(ts_str[i]);
}
const time_t cur_ts = log_epoch_secs;

Loading…
Cancel
Save