diff options
| author | fukachan <fukachan> | 2002-07-18 23:14:12 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-07-18 23:14:12 +0000 |
| commit | ecd564bfcc2744e90f3175e8e77ac942a1f144b8 (patch) | |
| tree | b9569280a2dfcbc8acd5c77a18ccd9ac22b057b6 | |
| parent | 98789a8f4e487a60ffd25154140f6e17c4f13af5 (diff) | |
| download | fml8-ecd564bfcc2744e90f3175e8e77ac942a1f144b8.tar.gz fml8-ecd564bfcc2744e90f3175e8e77ac942a1f144b8.tar.bz2 fml8-ecd564bfcc2744e90f3175e8e77ac942a1f144b8.zip | |
enhance command syntax regexp
| -rw-r--r-- | fml/lib/FML/Restriction/Command.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fml/lib/FML/Restriction/Command.pm b/fml/lib/FML/Restriction/Command.pm index dd8028ff..389bb601 100644 --- a/fml/lib/FML/Restriction/Command.pm +++ b/fml/lib/FML/Restriction/Command.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: Command.pm,v 1.2 2002/04/06 14:48:03 fukachan Exp $ +# $FML: Command.pm,v 1.3 2002/07/02 04:01:29 fukachan Exp $ # package FML::Restriction::Command; @@ -51,10 +51,10 @@ sub is_secure_command_string } # 2. allow - # command = \w+ + # command = [-\d\w]+ # mail address = [-_\w]+@[\w\-\.]+ # command options = last:30 - if ($s =~/^[\s\w\_\-\.\,\@\:]+$/o) { + if ($s =~/^[-\d\w]+\s+[\s\w\_\-\.\,\@\:]+$/o) { return 1; } @@ -78,6 +78,7 @@ sub is_valid_mail_address { my ($s) = @_; + # 1. NOT Japanese strings ($s !~ /\s|\033\$[\@B]|\033\([BJ]/ && $s =~ /^[\0-\177]+\@[\0-\177]+$/) ? 1 : 0; } |
