Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 132380
Status: patched
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: radomirpolach [...] protonmail.com
Cc:
AdminCc:

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



Subject: append_string fails to get id from APPEND in more complex answer
Date: Sun, 19 Apr 2020 14:34:29 +0000
To: "bug-Mail-IMAPClient [...] rt.cpan.org" <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Ing. Radomír Polách <radomirpolach [...] protonmail.com>
I am having answers like these: 20 APPEND Folders/Test (\Seen) "09-Apr-2020 12:21:44 +0000" {3032}+ send literal * 1 EXISTS * OK [UNSEEN 0] * 1 FETCH (FLAGS (\Seen nonjunk) UID 7) 20 OK [APPENDUID 5 7] APPEND successful This coauses this line: my $ret = $data =~ m#\s+(\d+)\]# ? $1 : $self; To produce 0 from [UNSEEN 0]. Needs to be replace with a least something like: my $ret = $data =~ m#\s+(\d+)\]\s+APPEND# ? $1 : $self; But I can image more complex answers, for example spaces after id: 20 OK [APPENDUID 5 7 ] APPEND successful So maybe even: my $ret = $data =~ m#\s+(\d+)\s+\]\s+APPEND# ? $1 : $self; The current regular expression is extremely fragile. Ing. Radomír Polách
Thank you for your report! I am anticipating making the following change in the next release... Old: my $ret = $data =~ m#\s+(\d+)\]# ? $1 : $self; New: my $ret = $data =~ m#APPENDUID\s+\S+\s+(\d+)\]# ? $1 : $self;
commit bb559cb952b7069d136438b60660f1dc68440ec1 (HEAD -> master, origin/master, origin/HEAD) Author: Phil Pearl <plobbes@gmail.com> Date: Mon Oct 12 23:51:07 2020 -0400 - rt.cpan.org#132380: append_string can fail to match APPENDUID in response