Merge branch 'master' of git@github.com:plainblack/webgui
This commit is contained in:
commit
da2b55d484
4 changed files with 18 additions and 2 deletions
|
|
@ -232,6 +232,11 @@ sub load {
|
|||
croak "Could not load $module because $moduleError{$module}";
|
||||
}
|
||||
|
||||
# Sanitize
|
||||
if ( $module !~ m{^\w+(?:::\w+)*$} ) {
|
||||
croak "Invalid module name: $module";
|
||||
}
|
||||
|
||||
# Try to load the module
|
||||
my $modulePath = $module . ".pm";
|
||||
$modulePath =~ s{::|'}{/}g;
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ sub addFileFromFilesystem {
|
|||
return undef;
|
||||
}
|
||||
my $filename = (File::Spec->splitpath( $pathToFile ))[2];
|
||||
if (isIn($self->getFileExtension($filename), qw(pl perl sh cgi php asp))) {
|
||||
if (isIn($self->getFileExtension($filename), qw(pl perl sh cgi php asp pm))) {
|
||||
$filename =~ s/\./\_/g;
|
||||
$filename .= ".txt";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue