diff options
| author | fukachan <fukachan> | 2003-02-13 14:06:12 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-02-13 14:06:12 +0000 |
| commit | 6ca39e4ba5f551e02cb754b6e5b134e902b768a9 (patch) | |
| tree | e7f6d4cbe45c64091f54de4c3b5350ed665e3386 /fml/lib/FML/Command/UserControl.pm | |
| parent | 64b38f4f931970c39003573e072ac31f5c1a72d4 (diff) | |
| download | fml8-6ca39e4ba5f551e02cb754b6e5b134e902b768a9.tar.gz fml8-6ca39e4ba5f551e02cb754b6e5b134e902b768a9.tar.bz2 fml8-6ca39e4ba5f551e02cb754b6e5b134e902b768a9.zip | |
user{add,del}() checks input $address.
nuke the corresponding TODO.
Diffstat (limited to 'fml/lib/FML/Command/UserControl.pm')
| -rw-r--r-- | fml/lib/FML/Command/UserControl.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fml/lib/FML/Command/UserControl.pm b/fml/lib/FML/Command/UserControl.pm index 8a378ff9..bd78b06c 100644 --- a/fml/lib/FML/Command/UserControl.pm +++ b/fml/lib/FML/Command/UserControl.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: UserControl.pm,v 1.24 2003/02/01 13:53:13 fukachan Exp $ +# $FML: UserControl.pm,v 1.25 2003/02/09 12:31:41 fukachan Exp $ # package FML::Command::UserControl; @@ -62,7 +62,11 @@ sub useradd my $maplist = $uc_args->{ maplist }; my $trycount = 0; - # XXX-TODO: validate $address by regexp here ? + # XXX check if $address is safe (persistent ?). + my $safe = new FML::Restriction::Base; + unless ($safe->regexp_match('address', $address)) { + croak("unsafe address"); + } # pass info into reply_message() my $msg_args = $command_args->{ msg_args }; @@ -125,7 +129,11 @@ sub userdel my $maplist = $uc_args->{ maplist }; my $trycount = 0; - # XXX-TODO: validate $address by regexp here ? + # XXX check if $address is safe (persistent ?). + my $safe = new FML::Restriction::Base; + unless ($safe->regexp_match('address', $address)) { + croak("unsafe address"); + } # pass info to reply_message() my $msg_args = $command_args->{ msg_args }; |
