diff options
| author | fukachan <fukachan> | 2003-01-26 03:11:59 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-01-26 03:11:59 +0000 |
| commit | 022982faa5cb64bc953ee9298f88b9ea5957eda2 (patch) | |
| tree | e0eb2ffb643b6d5aba5ceb151f4e4fd66b63fc01 /fml | |
| parent | 934a7ab9287bcfed10cb1e70b575f799b9d09fc4 (diff) | |
| download | fml8-022982faa5cb64bc953ee9298f88b9ea5957eda2.tar.gz fml8-022982faa5cb64bc953ee9298f88b9ea5957eda2.tar.bz2 fml8-022982faa5cb64bc953ee9298f88b9ea5957eda2.zip | |
define 'command_line_options' regexp.
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/lib/FML/Restriction/Base.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fml/lib/FML/Restriction/Base.pm b/fml/lib/FML/Restriction/Base.pm index 26214b3e..999519a3 100644 --- a/fml/lib/FML/Restriction/Base.pm +++ b/fml/lib/FML/Restriction/Base.pm @@ -3,7 +3,7 @@ # Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Base.pm,v 1.18 2003/01/25 09:14:06 fukachan Exp $ +# $FML: Base.pm,v 1.19 2003/01/25 09:34:44 fukachan Exp $ # package FML::Restriction::Base; @@ -26,6 +26,12 @@ FML::Restriction::Base -- define safe data representations # o.k. do something ... } +or + + if ($safe->regexp_match('address', $data)) { + # o.k. do something ... + } + =head1 DESCRIPTION FML::Restriction::Base provides data regexp considered as safe. @@ -87,6 +93,7 @@ my $user_regexp = '[-A-Za-z0-9\._]+'; my $command_regexp = '[-A-Za-z0-9_]+'; my $file_regexp = '[-A-Za-z0-9_]+'; my $dir_regexp = '[-A-Za-z0-9_]+'; +my $option_regexp = '[-A-Za-z0-9]+'; my %basic_variable = ( # address, user and domain et.al. @@ -108,6 +115,9 @@ my %basic_variable = 'directory' => $dir_regexp, 'file' => $file_regexp, 'map' => $file_regexp, + + # unix command switch + 'command_line_options' => $option_regexp, ); |
