Browse Source

[mod_auth] terminate salt for CRYPT-MD5-NTLM

personal/stbuehler/mod-csrf-old
Glenn Strauss 5 years ago
parent
commit
3c24ec7393
  1. 1
      src/mod_authn_file.c

1
src/mod_authn_file.c

@ -686,6 +686,7 @@ static handler_t mod_authn_file_htpasswd_basic(server *srv, connection *con, voi
/*(reuse sample buffer for salt (FYI: expect slen == 8))*/
memcpy(sample, CONST_STR_LEN("$1$"));
memcpy(sample+sizeof("$1$")-1, b, slen);
sample[sizeof("$1$")-1+slen] = '\0';
#if defined(HAVE_CRYPT_R)
crypted = crypt_r(ntlmhex, sample, &crypt_tmp_data);
#else

Loading…
Cancel
Save