Welcome! Log In Create A New Profile

Advanced

[nginx] Mail: don't emit separator in capability lists for APOP.

Sergey Kandaurov
March 06, 2017 11:14AM
details: http://hg.nginx.org/nginx/rev/03735fef08da
branches:
changeset: 6924:03735fef08da
user: Sergey Kandaurov <pluknet@nginx.com>
date: Mon Mar 06 17:56:23 2017 +0300
description:
Mail: don't emit separator in capability lists for APOP.

Notably, this fixes CAPA and AUTH output.

The bug had appeared in nginx 1.11.6 (73b451d304c0).

diffstat:

src/mail/ngx_mail_pop3_module.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)

diffs (47 lines):

diff -r fbdaad9b0e7b -r 03735fef08da src/mail/ngx_mail_pop3_module.c
--- a/src/mail/ngx_mail_pop3_module.c Mon Mar 06 11:09:47 2017 +0300
+++ b/src/mail/ngx_mail_pop3_module.c Mon Mar 06 17:56:23 2017 +0300
@@ -185,6 +185,10 @@ ngx_mail_pop3_merge_srv_conf(ngx_conf_t
m <= NGX_MAIL_AUTH_EXTERNAL_ENABLED;
m <<= 1, i++)
{
+ if (ngx_mail_pop3_auth_methods_names[i].len == 0) {
+ continue;
+ }
+
if (m & conf->auth_methods) {
size += 1 + ngx_mail_pop3_auth_methods_names[i].len;
}
@@ -212,6 +216,10 @@ ngx_mail_pop3_merge_srv_conf(ngx_conf_t
m <= NGX_MAIL_AUTH_EXTERNAL_ENABLED;
m <<= 1, i++)
{
+ if (ngx_mail_pop3_auth_methods_names[i].len == 0) {
+ continue;
+ }
+
if (m & conf->auth_methods) {
*p++ = ' ';
p = ngx_cpymem(p, ngx_mail_pop3_auth_methods_names[i].data,
@@ -248,6 +256,10 @@ ngx_mail_pop3_merge_srv_conf(ngx_conf_t
m <= NGX_MAIL_AUTH_EXTERNAL_ENABLED;
m <<= 1, i++)
{
+ if (ngx_mail_pop3_auth_methods_names[i].len == 0) {
+ continue;
+ }
+
if (m & conf->auth_methods) {
size += ngx_mail_pop3_auth_methods_names[i].len
+ sizeof(CRLF) - 1;
@@ -269,6 +281,10 @@ ngx_mail_pop3_merge_srv_conf(ngx_conf_t
m <= NGX_MAIL_AUTH_EXTERNAL_ENABLED;
m <<= 1, i++)
{
+ if (ngx_mail_pop3_auth_methods_names[i].len == 0) {
+ continue;
+ }
+
if (m & conf->auth_methods) {
p = ngx_cpymem(p, ngx_mail_pop3_auth_methods_names[i].data,
ngx_mail_pop3_auth_methods_names[i].len);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Mail: don't emit separator in capability lists for APOP.

Sergey Kandaurov 509 March 06, 2017 11:14AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready