aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog2
-rw-r--r--lib/Net/IMAP/InterIMAP.pm1
2 files changed, 3 insertions, 0 deletions
diff --git a/Changelog b/Changelog
index 5658eed..9aba7cd 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,8 @@ interimap (0.5.2) UNRELEASED;
- Makefile: remove 'smart' extension from pandoc call to generate
manuals (it's no longer supported by pandoc 2.9 which generates \[lq]
and \[rq] in the groff output anyway).
+ * libinterimap: fail when a capability to ENABLE is missing from the
+ server's CAPABILITY listing.
-- Guilhem Moulin <guilhem@fripost.org> Mon, 03 Aug 2020 14:51:23 +0200
diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm
index 1bff06e..751e705 100644
--- a/lib/Net/IMAP/InterIMAP.pm
+++ b/lib/Net/IMAP/InterIMAP.pm
@@ -506,6 +506,7 @@ sub new($%) {
: ($self->{enable});
if (@extensions) {
$self->fail("Server did not advertise ENABLE (RFC 5161) capability.") unless $self->_capable('ENABLE');
+ $self->fail("Server did not advertise $_ capability.") foreach grep { !$self->_capable($_) } @extensions;
$self->_send('ENABLE '.join(' ',@extensions));
my @enabled = @{$self->{_ENABLED} // []};
$self->fail("Couldn't ENABLE $_") foreach