Skip to content

Commit

Permalink
digestmd5.c: don't try to locate a reauth cache entry if reauth isn't…
Browse files Browse the repository at this point in the history
… enabled on the server-side (NULL timeout == NULL hash table size)
  • Loading branch information
ksmurchison committed Aug 30, 2013
1 parent f2e77ab commit 76ce885
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/digestmd5.c
Expand Up @@ -2112,7 +2112,7 @@ digestmd5_server_mech_step1(server_context_t *stext,
return SASL_FAIL;
}

if (text->http_mode &&
if (text->http_mode && text->reauth->timeout &&
sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */

/* Create an initial cache entry for non-persistent HTTP connections */
Expand Down Expand Up @@ -2451,7 +2451,7 @@ static int digestmd5_server_mech_step2(server_context_t *stext,
#endif
}

if (!text->nonce) {
if (!text->nonce && text->reauth->timeout) {
unsigned val = hash((char *) nonce) % text->reauth->size;

/* reauth attempt or continuation of HTTP Digest on a
Expand Down

0 comments on commit 76ce885

Please sign in to comment.