aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-08-03 18:24:30 +0200
committerGuilhem Moulin <guilhem@fripost.org>2020-08-03 20:29:56 +0200
commit845d43fcc08089e87cd8cdf776ebc2345fd4e1ff (patch)
tree3bda52880e4f5257c80e48dd749b8009008c15cb /lib
parent8235ce0f68063fed88d864477b41e1c2903d0966 (diff)
libinterimap: fail when a capability to ENABLE is missing from the server's CAPABILITY listing.
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/IMAP/InterIMAP.pm1
1 files changed, 1 insertions, 0 deletions
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