Skip Menu |
 

This queue is for tickets about the File-Path CPAN distribution.

Report information
The Basics
Id: 73840
Status: resolved
Priority: 0/
Queue: File-Path

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

Bug Information
Severity: Normal
Broken in: 2.08
Fixed in: 2.10_001



Subject: Minor bug in rmtree with newlines in CWD
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 479
Download (untitled) / with headers
text/plain 479b
It looks like the untaint line in sub rmtree needs a /s flag adding, ie for ($arg->{cwd}) { /\A(.*)\Z/; $_ = $1 } # untaint should be changed to for ($arg->{cwd}) { /\A(.*)\Z/s; $_ = $1 } # untaint Else weird things happen if the CWD has a newline in it ($arg->{cwd} will be set to $1, which will be set from any previous regex match, since the /\A(.*)\Z/ match will fail). This usually results in rmtree incorrectly failing with a weird "cannot stat" error message. David
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-30889-1430598149-45.73840-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 123
Download (untitled) / with headers
text/plain 123b
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-13507-1435333965-1744.73840-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 109
Download (untitled) / with headers
text/plain 109b
This issue has been resolved in dev release http://search.cpan.org/~riche/File-Path/Path.pm version 2.10_001.


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.