Skip Menu |
 

This queue is for tickets about the Net-IMAP-Simple CPAN distribution.

Report information
The Basics
Id: 129544
Status: new
Priority: 0/
Queue: Net-IMAP-Simple

People
Owner: Nobody in particular
Requestors: tlhackque [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



MIME-Version: 1.0
X-Spam-Status: No, score=-1.77 tagged_above=-99.9 required=10 tests=[AWL=-0.664, BAYES_00=-1.9, HTML_MESSAGE=0.001, RDNS_NONE=0.793] autolearn=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
Content-Type: multipart/signed; boundary="ztShj2hrbgy2ngqvEiUgJk38ocyHRrvkn"; micalg="pgp-sha1"; protocol="application/pgp-signature"
Message-ID: <471b87e7-fa32-ae8a-f8c3-a52a6ebc888b [...] cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: clamav-milter 0.101.2 at overkill.sb.litts.net
Autocrypt: addr=tlhackque [...] cpan.org; prefer-encrypt=mutual; keydata= mQINBFaj2/wBEAD0jnPqr8X/ArJ96gEcW1rrbO8cA+wti4DHxaS9qNi9L195+mSJZOoqaACR M+oS0HqOvA0IXSjgLPpiMiUiA0WDLQnx+YXRwKVU2WICUmJ8dax9KQLNupMH8YOGRnc+QDMT FolaPJlL1PPFxrGNad20GKf3QaM+85Wt2Apl9KZvKJUZEJaVz2/xiBTDvutA7tWKG2aq1T8L J/4SZmC/NrIk8ssjCD2FaP3xa83nsoZZfFKg6Emw9Z803FObN+9CgLWGd4hzyqG5aautqiMn xlcDJ0PsDtwjsQ1d3MyFGi18zV+9/GWgeeemUJFgLNJBKFrJoJWuz5MyfCdH16ezbTtkZrVy YPZCrK+3r92sm91qq6c1auboZ+N/HEUFH+94/62PCUaZ4NerNTJWZIbN1QHmcPxg9hWHcR5H 9+ji8wa2CvoFiRHYJnxLcWtSgice+mAlkeEfWeY9jCjIWL33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4KzDK46LLrjYyPEIgLDcnR7UH7 tllEu/+qJ9a6SbBK37cXJM4lTzj1M7MVLviw44WNa+lxbOnVkJc1xH7uZrviN3tET9hdfyv7 jQGx1RJwRGQua87+F/YDerh1DoxkIZjmEoP3Vx7aEcOfkDotvObzR1G6D7BJP89fKmocnFUS 49xRJqXM+PrWgZJx8XvmDRM7b9A1mKCDYxdhXJZXkLMj8hVXtW4czm2u5fAYNqF3mLm6RoZQ zojWBYL6/Mq1L7ALsY/V24x57oTLNFtic+gZTgHf+by/niAGQ/NVwgMDHS2ConWx8k+YHo2I QoQwpfjp7A==
X-Spam-Score: -1.77
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 4DF59240210 for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Sun, 12 May 2019 09:31:11 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kFo2QThpwyaI for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Sun, 12 May 2019 09:31:10 -0400 (EDT)
Received: from xx1.develooper.com (unknown [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id 4DB3F24011F for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 12 May 2019 09:31:10 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 518937CF56 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 12 May 2019 06:31:09 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 726747CF54 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 12 May 2019 06:31:07 -0700 (PDT)
Received: from nano.litts.net (nano.v4.litts.net [96.233.62.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 0FC477C1C8 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 12 May 2019 06:31:04 -0700 (PDT)
Received: from [IPv6:2001:470:8f95:941::110] (scream.v6.sb.litts.net [IPv6:2001:470:8f95:941::110]) (authenticated bits=0) by nano.litts.net (8.14.9/8.14.9) with ESMTP id x4CDQnCc002876 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 12 May 2019 09:26:50 -0400
Delivered-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
Subject: NOOP should return status, all should handle untagged BYE
Return-Path: <tlhackque [...] cpan.org>
X-RT-Mail-Extension: net-imap-simple
X-Original-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
Openpgp: preference=signencrypt
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_NO_HTTP 0.1, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTH_SIZE_3000_MORE 0, BODYTEXTP_SIZE_3000_LESS 0, DATE_TZ_NA 0, NO_CTA_URI_FOUND 0, NO_URI_FOUND 0, NO_URI_HTTPS 0, SPF_NONE 0, __ATTACHMENT_SIZE_0_10K 0, __BODY_TEXT_X4 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_ATTACHMENT 0, __HAS_ATTACHMENT1 0, __HAS_ATTACHMENT2 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HIGHBITS 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __OEM_PRICE 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_END 0, __TAG_EXISTS_HTML 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0, __zen.spamhaus.org_ERROR '
Date: Sun, 12 May 2019 09:26:49 -0400
X-Spam-Level:
X-Greylist: delayed 250 seconds by postgrey-1.34 at xx1.develooper.com; Sun, 12 May 2019 06:31:06 PDT
X-Virus-Status: Clean
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.5.12.131517
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Timothe Litt <tlhackque [...] cpan.org>
X-RT-Interface: Email
Content-Length: 0
Subject: NOOP should return status, all should handle untagged BYE
Message-ID: <471b87e7-fa32-ae8a-f8c3-a52a6ebc888b [...] cpan.org>
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Timothe Litt <tlhackque [...] cpan.org>
Content-Language: en-US
Content-Type: multipart/alternative; boundary="------------2C49C25B491FF9C67C98D76C"
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 2268
Download (untitled) / with headers
text/plain 2.2k
While NOOP 'always succeeds', it also can return status indicating errors. 'BAD' is possible per the IMAP spec - but that really shouldn't happen since N:I:S generates a valid command. More interesting is the case of the server closing the connection(e.g, when one is late sending the NOOP, when the IMAP server is restarted, or the connection is administratively disconnected). Currently, noop() always returns true.  It should return undef (and set an error) when it fails. Returning status is simple: add a 'final' callback that returns 1. |sub noop {|| ||    my $self = shift;|| ||    return $self->_process_cmd(|| ||        cmd => [ "NOOP" ],|| ||        final => sub { 1 },|| ||    );|| ||}| _process_cmd() will then handle returning the error or OK status. BYE is an untagged response that can come at any time (see 7.1.5 in RFC 3501). In theory, it can arrive with a tagged completion, but at present, _cmd_ok does not handle this gracefully - it simply returns undef, indicating failure.  Any completion is ignored. While handling an accompanying completion would be a bit involved, _cmd_ok() should at least capture the reason for an (untagged) BYE.  This can be done with one line of code: |} elsif ( $res =~ m/^\*\s+/ ) {|| | |}| becomes |} elsif ( $res =~ m/^\*\s+/ ) {     $self->_seterrstr( $1 ) if( $res =~ /^\*\s+BYE\s+(.*?)\r?$/i ); }| || This debugger session demonstrates the result.  A noop is sent, the connection is administratively closed from the server side, and another noop is sent. The first NOOP returns success, the second returns undef, and errstr is set with the server's reason. |  DB<2>  x $mbx->debug(1)|| ||0  1|| ||  DB<3> x scalar $mbx->noop, $mbx->{_errstr}|| ||[...in sub _send_cmd] 1 NOOP\r\n|| ||[...in sub _process_cmd] 1 OK NOOP completed (0.001 + 0.000 secs).\r\n|| ||[...in sub _cmd_ok] 1 OK NOOP completed (0.001 + 0.000 secs).\r\n|| ||0  1|| ||1  ||undef|| ||  DB<4> x scalar $mbx->noop, $mbx->{_errstr}|| ||[...in sub _send_cmd] 2 NOOP\r\n|| ||[...in sub _process_cmd] * BYE Server shutting down.\r\n|| ||[...in sub _seterrstr] Server shutting down.|| ||[...in sub _cmd_ok] * BYE Server shutting down.\r\n|| ||0  undef|| ||1  ||'Server shutting down.'|| || |
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 3765
Content-Description: OpenPGP digital signature
Content-Type: application/pgp-signature; name="signature.asc"
Content-Disposition: attachment; filename="signature.asc"
Content-Length: 834
Download signature.asc
application/pgp-signature 834b

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.