Skip Menu |
 

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 101375
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: dfs+pause [...] roaringpenguin.com
Requestors: torge.husfeldt [...] 1und1.de
Cc:
AdminCc:

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



Subject: MIME::Parser::Reader buggy regexp
Date: Wed, 07 Jan 2015 15:28:39 +0100
To: bug-MIME-tools [...] rt.cpan.org
From: Torge Husfeldt <torge.husfeldt [...] 1und1.de>
Download (untitled) / with headers
text/plain 1.3k
Hi, I believe all instances of the following as bugs: $_ =~ s/(:?\n\r|\r\n|\r)$/\n/ if $normalize_newlines; ^^^ I'm pretty sure this was meant to be a non-capturing, grouping regexp. Yet it turns out to be a capturing regexp looking for an optional colon in just one of the alternative newline-styles. This error got copy-pasted to the following lines: 244: $_ =~ s/(:?\n\r|\r\n|\r)$/\n/ if $normalize_newlines; 256: $_ =~ s/(:?\n\r|\r\n|\r)$/\n/ if $normalize_newlines; 270: $_ =~ s/(:?\n\r|\r\n|\r)$/\n/ if $normalize_newlines; 282: $_ =~ s/(:?\n\r|\r\n|\r)$/\n/ if $normalize_newlines; I found this in the latest source pulled right now from: http://cpansearch.perl.org/src/DSKOLL/MIME-tools-5.505/lib/MIME/Parser/Reader.pm but it is also present in: This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi (with 41 registered patches, see perl -V for more detail) on: Linux LXKA-G99G7W1 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Proposed patch attached. HTH -- Torge Husfeldt 1&1 Internet Service GmbH | Brauerstraße 50 | 76135 Karlsruhe | Germany Phone: +49 721 91374-4795 E-Mail: torge.husfeldt@1und1.de | Web: www.1und1.de Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 20141 Geschäftsführer: Frank Einhellinger, Uwe Lamnek, Jan Oetjen Member of United Internet
Download Reader.pm.patch
text/x-diff 2.8k

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #101375] MIME::Parser::Reader buggy regexp
Date: Wed, 7 Jan 2015 09:39:18 -0500
To: bug-MIME-tools [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Download (untitled) / with headers
text/plain 318b
On Wed, 7 Jan 2015 09:28:55 -0500 "Torge Husfeldt via RT" <bug-MIME-tools@rt.cpan.org> wrote: Show quoted text
> I believe all instances of the following as bugs: > $_ =~ s/(:?\n\r|\r\n|\r)$/\n/ if $normalize_newlines; > ^^^
Oh, wow. :) Yes, that's a ridiculous bug. Thanks for your patch; I'll apply it. Regards, David.
Download (untitled) / with headers
text/plain 151b
Hi, Although the Changelog does not mention it, this bug is in fact fixed in the recent 5.506 release. Thanks for the bug report. Regards, Dianne.


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.