[nginx-tests] Tests: added test that EXTERNAL mail auth clears o...

Maxim Dounin mdounin at mdounin.ru
Mon Jun 3 15:16:43 UTC 2024


details:   http://freenginx.org/hg/nginx-tests/rev/81519d01f238
branches:  
changeset: 1984:81519d01f238
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Jun 03 18:15:22 2024 +0300
description:
Tests: added test that EXTERNAL mail auth clears old password.

diffstat:

 mail_imap.t |  19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diffs (36 lines):

diff --git a/mail_imap.t b/mail_imap.t
--- a/mail_imap.t
+++ b/mail_imap.t
@@ -93,7 +93,7 @@ http {
 EOF
 
 $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon);
-$t->run()->plan(29);
+$t->run()->plan(30);
 
 $t->waitforsocket('127.0.0.1:' . port(8144));
 
@@ -184,6 +184,23 @@ my $s = Test::Nginx::IMAP->new();
 $s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test at example.com', ''));
 $s->ok('auth external with username');
 
+# auth external after failed plain
+
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.27.1');
+
+$s = Test::Nginx::IMAP->new();
+$s->read();
+
+$s->send('1 AUTHENTICATE PLAIN '
+	. encode_base64("\0test\@example.com\0bad", ''));
+$s->read();
+
+$s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test at example.com', ''));
+$s->ok('auth external after plain');
+
+}
+
 # quoted strings
 
 $s = Test::Nginx::IMAP->new();



More information about the nginx-devel mailing list