diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-05-06 15:15:56 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-05-06 15:15:56 +0300 |
commit | 82ff096dd4ceda1177bc925c3d6845998e692590 (patch) | |
tree | 15baf499bfc8dc76bbc552b714d947c98457ac8e /src/microhttpd/digestauth.c | |
parent | 4b3895dd4aa47e550839c11889381e8442e20a4e (diff) | |
download | libmicrohttpd-82ff096dd4ceda1177bc925c3d6845998e692590.tar.gz libmicrohttpd-82ff096dd4ceda1177bc925c3d6845998e692590.zip |
Added one more fallback for unique nonce generation
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r-- | src/microhttpd/digestauth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index 8d907e13..a95455d3 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c | |||
@@ -992,6 +992,8 @@ calculate_add_nonce_with_retry (struct MHD_Connection *const connection, | |||
992 | base3 = ((uint16_t) (base2 >> 16)) ^ ((uint16_t) base2); | 992 | base3 = ((uint16_t) (base2 >> 16)) ^ ((uint16_t) base2); |
993 | base4 = ((uint8_t) (base3 >> 8)) ^ ((uint8_t) base3); | 993 | base4 = ((uint8_t) (base3 >> 8)) ^ ((uint8_t) base3); |
994 | timestamp2 -= (base4 & 0x7f); /* Use up to 127 ms difference */ | 994 | timestamp2 -= (base4 & 0x7f); /* Use up to 127 ms difference */ |
995 | if (timestamp1 == timestamp2) | ||
996 | timestamp2 -= 2; | ||
995 | } | 997 | } |
996 | if (! calculate_add_nonce (connection, timestamp2, realm, da, nonce2)) | 998 | if (! calculate_add_nonce (connection, timestamp2, realm, da, nonce2)) |
997 | { | 999 | { |