Skip to content

Commit

Permalink
Avoid magic $cwd in module search path RT #130883
Browse files Browse the repository at this point in the history
https://rt.perl.org/Ticket/Display.html?id=130883

Similar to the Perl dot-inc security issue, but limit to when PERL6LIB (or `use lib`) is set to an empty string:

$ echo 'package { say "all your base" }' > NativeCall.pm6
$ PERL6LIB="" perl6 -e 'use NativeCall;'
all your base


Note this PR has a LTA error when using `use lib ""`:

$ perl6 -e 'use lib "";'
===SORRY!===
Too few positionals passed to 'repository-for-spec'; expected 3 arguments but got 0
  • Loading branch information
ugexe committed Jul 13, 2017
1 parent c86090e commit 075ddef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/CompUnit/RepositoryRegistry.pm
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ class CompUnit::RepositoryRegistry {

# something we understand
if $spec ~~ /^
<before .>
[
$<type>=[ <.ident>+ % '::' ]
[ '#' $<n>=\w+
Expand Down

0 comments on commit 075ddef

Please sign in to comment.