mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MEDIUM: auth: fix segfault with http-auth and a configuration with an unknown encryption algorithm
Grgoire Morpain reported a segfault when a secured password is used for http authentication. It was caused by the use of an unsupported encryption algorithm with libcrypto. In this case, crypt() returns a NULL pointer. The fix should be backported to 1.4 and 1.5.
This commit is contained in:
parent
aa4e32e10a
commit
c82279c5fc
@ -252,7 +252,7 @@ check_user(struct userlist *ul, const char *user, const char *pass)
|
|||||||
fprintf(stderr, ", crypt=%s\n", ep);
|
fprintf(stderr, ", crypt=%s\n", ep);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!strcmp(ep, u->pass))
|
if (ep && strcmp(ep, u->pass) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user