[prev in list] [next in list] [prev in thread] [next in thread]
List: perl5-porters
Subject: Re: [perl #131651] Add -P and -N switches that use <<>> instead of readline
From: Sawyer X <xsawyerx () gmail ! com>
Date: 2017-07-27 8:03:27
Message-ID: d84e9a61-c877-2bdf-f450-9876d1c9013a () gmail ! com
[Download RAW message or body]
Why just -N?
I think there are no objections left for -N or -P.
On 07/26/2017 05:26 PM, Chas. Owens wrote:
> Where does this stand? Is it desirable to have a patch that
> implements just a -N flag that forces use of <<>>? So -N is
>
> LINE: while (defined($_ = <<ARGV>>)) {
> '???';
> }
>
> and -Np is
>
> LINE: while (defined($_ = <<ARGV>>)) {
> '???';
> }
> continue {
> die "-p destination: $!\n" unless print $_;
> }
>
> On Sun, Jul 2, 2017 at 4:55 AM Lukas Mai via RT
> <perlbug-followup@perl.org <mailto:perlbug-followup@perl.org>> wrote:
>
> Am 28.06.2017 um 02:07 schrieb Chas. Owens:
> >
> >
> > On Tue, Jun 27, 2017, 19:46 Sawyer X <xsawyerx@gmail.com
> <mailto:xsawyerx@gmail.com>
> > <mailto:xsawyerx@gmail.com <mailto:xsawyerx@gmail.com>>> wrote:
> >
> >
> > > If someone already has access to a command line, then it
> is more
> > about surprises than security.
> >
> > Thank you for adding that.
> >
> >
> > File names aren't necessarily safe:
> >
> > $ tar xvfz somecode.tgz
> > $ cd somecode
> > $ perl -nE 'say if /someregex/' *
> >
> > If somecode.tgz had a file named "|rm -rf /home" then you are
> very unhappy.
>
> You can't have / in a filename, so it's impossible for * to expand to
> "|rm -rf /home". Unfortunately that doesn't protect you: touch 'rm -rf
> `printf \\\\57`home |' still works. See
> http://www.perlmonks.org/?node_id=258980. :-)
>
>
> --
> Lukas Mai <plokinom@gmail.com <mailto:plokinom@gmail.com>>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic