# HG changeset patch # User Maxim Dounin # Date 1717427722 -10800 # Node ID 81519d01f238c5d602e0d7452c8ecb6d512e25a2 # Parent c7315caf211007b327886fe7cd544be018c0a398 Tests: added test that EXTERNAL mail auth clears old password. 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@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@example.com', '')); +$s->ok('auth external after plain'); + +} + # quoted strings $s = Test::Nginx::IMAP->new();