Skip to content

Commit

Permalink
only allow word characters in script names
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 16, 2009
1 parent 06ee1a1 commit 47aa0b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -78,6 +78,7 @@ This file documents the revision history for Perl extension Mojo.
- Fixed cloning of urls with base in Mojo::URL.
- Fixed parsing of multiple headers and cookies with same name.
- Fixed pipeline support in Mojo::Client. (acajou)
- Fixed Mojo::Scripts to only allow word characters in script names.

0.991246 2009-08-01 00:00:00
- Fixed typo.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Scripts.pm
Expand Up @@ -27,7 +27,7 @@ sub run {
my ($self, $name, @args) = @_;

# Run script
if ($name && ($name ne 'help' || $args[0])) {
if ($name && $name =~ /^\w+$/ && ($name ne 'help' || $args[0])) {

# Help?
my $help = $name eq 'help' ? 1 : 0;
Expand Down

0 comments on commit 47aa0b9

Please sign in to comment.