mirror of
https://github.com/nginx/nginx.git
synced 2025-01-22 22:33:15 -06:00
fix segfault when CRAM-MD5 is not enabled but client tries it
This commit is contained in:
parent
fa808bbc04
commit
a9af7bfada
@ -708,7 +708,10 @@ ngx_pop3_auth_state(ngx_event_t *rev)
|
|||||||
(u_char *) "CRAM-MD5", 8)
|
(u_char *) "CRAM-MD5", 8)
|
||||||
== 0)
|
== 0)
|
||||||
{
|
{
|
||||||
if (s->args.nelts != 1) {
|
if (!(cscf->pop3_auth_methods
|
||||||
|
& NGX_MAIL_AUTH_CRAM_MD5_ENABLED)
|
||||||
|
|| s->args.nelts != 1)
|
||||||
|
{
|
||||||
rc = NGX_MAIL_PARSE_INVALID_COMMAND;
|
rc = NGX_MAIL_PARSE_INVALID_COMMAND;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1368,7 +1371,13 @@ ngx_smtp_auth_state(ngx_event_t *rev)
|
|||||||
(u_char *) "CRAM-MD5", 8)
|
(u_char *) "CRAM-MD5", 8)
|
||||||
== 0)
|
== 0)
|
||||||
{
|
{
|
||||||
if (s->args.nelts != 1) {
|
cscf = ngx_mail_get_module_srv_conf(s,
|
||||||
|
ngx_mail_core_module);
|
||||||
|
|
||||||
|
if (!(cscf->smtp_auth_methods
|
||||||
|
& NGX_MAIL_AUTH_CRAM_MD5_ENABLED)
|
||||||
|
|| s->args.nelts != 1)
|
||||||
|
{
|
||||||
rc = NGX_MAIL_PARSE_INVALID_COMMAND;
|
rc = NGX_MAIL_PARSE_INVALID_COMMAND;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user