diff options
| author | fukachan <fukachan> | 2002-04-23 09:32:34 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-04-23 09:32:34 +0000 |
| commit | d6c9fce0f18e35c79aefc6670e814db04d88a20e (patch) | |
| tree | 9288c1db1f23cdd7ec8b8ed1d394c306cb337244 /fml/lib/FML/Process | |
| parent | 38eeba657b2604fd504e73a6f80a964a087ccde3 (diff) | |
| download | fml8-d6c9fce0f18e35c79aefc6670e814db04d88a20e.tar.gz fml8-d6c9fce0f18e35c79aefc6670e814db04d88a20e.tar.bz2 fml8-d6c9fce0f18e35c79aefc6670e814db04d88a20e.zip | |
define cgi_try_get_ml_name()
enabled newml and rmml on CGI.
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/CGI/Kernel.pm | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm index 3e634537..16906373 100644 --- a/fml/lib/FML/Process/CGI/Kernel.pm +++ b/fml/lib/FML/Process/CGI/Kernel.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: Kernel.pm,v 1.22 2002/04/10 09:51:26 fukachan Exp $ +# $FML: Kernel.pm,v 1.23 2002/04/22 11:11:09 fukachan Exp $ # package FML::Process::CGI::Kernel; @@ -510,7 +510,7 @@ sub cgi_try_get_address # retry ! unless ($a) { - eval q{ $a = $curproc->safe_param_address_selected();}; + eval q{ $a = $curproc->safe_param_address();}; unless ($@) { $address = $a; } @@ -525,6 +525,50 @@ sub cgi_try_get_address } +=head2 cgi_try_get_address() + +return input address after validating the input + +=cut + + +# Descriptions: return input ml_name after validating the input +# Arguments: OBJ($curproc) HASH_REF($args) +# Side Effects: longjmp() if critical error occurs. +# Return Value: STR +sub cgi_try_get_ml_name +{ + my ($curproc, $args) = @_; + my $ml_name = ''; + my $a = ''; + + eval q{ $a = $curproc->safe_param_ml_name_specified();}; + unless ($@) { + $ml_name = $a; + } + else { + # XXX longjmp() if insecure input is given. + my $r = $@; + if ($r =~ /ERROR\.INSECURE/) { croak($r);} + } + + # retry ! + unless ($a) { + eval q{ $a = $curproc->safe_param_ml_name();}; + unless ($@) { + $ml_name = $a; + } + else { + # XXX longjmp() if insecure input is given. + my $r = $@; + if ($r =~ /ERROR\.INSECURE/) { croak($r);} + } + } + + return $ml_name; +} + + =head2 safe_param_xxx() get and filter param('xxx') via AUTOLOAD(). |
