Skip Menu |

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

Report information
The Basics
Id: 61068
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

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

Bug Information
Severity: Normal
Broken in:
  • 2.2.9
  • 3.00
Fixed in: 3.26



Subject: append_string can invalidate a good $date if $date not wrapped in double quotes
Since 2.x Mail::IMAPClient append_string handles $date in the following manner: if (defined($date)) { $date =~ s/^\s+//g; $date =~ s/\s+$//g; } Relevant RFC 3501 details: date-time = DQUOTE date-day-fixed "-" date-month "-" date-year SP time SP zone DQUOTE date-day-fixed = (SP DIGIT) / 2DIGIT Per RFC 3501, a valid $date value could begin with a space followed by a digit (SP DIGIT). The code should try to do the right thing but not break potentially valid values in the process. Note: this can cause problems with imapsync version ~1.335 and greater as code in imapsync looks like this: sub good_date { my ($d) = @_; return($d) if (! $usedatemanip); # <- *this was added* $d = UnixDate(ParseDate($d), "%d-%b-%Y %H:%M:%S %z"); $d = "\"$d\""; return($d); }
- rt.cpan.org#61068: append_string can invalidate a good $date cleanup regex on $flags and $date for append_string() - update basic.t test cases for append, append_string