summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/FileUtils.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-07-02 12:04:57 +0000
committerfukachan <fukachan>2002-07-02 12:04:57 +0000
commit32ee4d0a6545ff68e461410a52c74dacf13ab308 (patch)
treec5c59ef811744ec8ae59a98379a7d26f187f043d /fml/lib/FML/Command/FileUtils.pm
parent17da3f4658fb5fe5b8b89cb730c1d97fbc6ddaf6 (diff)
downloadfml8-32ee4d0a6545ff68e461410a52c74dacf13ab308.tar.gz
fml8-32ee4d0a6545ff68e461410a52c74dacf13ab308.tar.bz2
fml8-32ee4d0a6545ff68e461410a52c74dacf13ab308.zip
fix comments
fix the reply message
Diffstat (limited to 'fml/lib/FML/Command/FileUtils.pm')
-rw-r--r--fml/lib/FML/Command/FileUtils.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/fml/lib/FML/Command/FileUtils.pm b/fml/lib/FML/Command/FileUtils.pm
index addf1184..f4b46e79 100644
--- a/fml/lib/FML/Command/FileUtils.pm
+++ b/fml/lib/FML/Command/FileUtils.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: FileUtils.pm,v 1.2 2002/03/30 11:08:34 fukachan Exp $
+# $FML: FileUtils.pm,v 1.3 2002/04/07 12:13:03 fukachan Exp $
#
package FML::Command::FileUtils;
@@ -16,7 +16,7 @@ use FML::Log qw(Log LogWarn LogError);
=head1 NAME
-FML::Command::FileUtils - utilities for file handling
+FML::Command::FileUtils - utilities to handle files
=head1 SYNOPSIS
@@ -77,6 +77,7 @@ sub remove
chdir $ml_home_dir || croak("cannot chdir \$ml_home_dir");
for my $file (@$argv) {
+ # If $file is a safe pattern, o.k. Try to remove it!
if ($file =~ /^$file_regexp$/) {
if (-f $file) {
unlink $file;
@@ -100,9 +101,11 @@ sub remove
$is_error++;
}
}
+ # $file filename is unsafe. stop.
else {
+ LogError("<$file> is insecure");
$curproc->reply_message_nl('command.insecure',
- "insecure input $file");
+ "insecure input");
croak("remove: insecure argument");
}
}