summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-02-13 14:06:12 +0000
committerfukachan <fukachan>2003-02-13 14:06:12 +0000
commit6ca39e4ba5f551e02cb754b6e5b134e902b768a9 (patch)
treee7f6d4cbe45c64091f54de4c3b5350ed665e3386 /fml/lib
parent64b38f4f931970c39003573e072ac31f5c1a72d4 (diff)
downloadfml8-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')
-rw-r--r--fml/lib/FML/Command/Admin/digest.pm4
-rw-r--r--fml/lib/FML/Command/Admin/off.pm3
-rw-r--r--fml/lib/FML/Command/Admin/on.pm3
-rw-r--r--fml/lib/FML/Command/Admin/subscribe.pm3
-rw-r--r--fml/lib/FML/Command/Admin/unsubscribe.pm3
-rw-r--r--fml/lib/FML/Command/UserControl.pm14
6 files changed, 16 insertions, 14 deletions
diff --git a/fml/lib/FML/Command/Admin/digest.pm b/fml/lib/FML/Command/Admin/digest.pm
index c9985873..2cc8e6c0 100644
--- a/fml/lib/FML/Command/Admin/digest.pm
+++ b/fml/lib/FML/Command/Admin/digest.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: digest.pm,v 1.6 2003/01/25 12:48:38 fukachan Exp $
+# $FML: digest.pm,v 1.7 2003/02/09 12:31:41 fukachan Exp $
#
package FML::Command::Admin::digest;
@@ -141,7 +141,6 @@ sub _digest_on
maplist => [ $digest_recipient_map ],
};
- # XXX-TODO: we expect userdel() and useradd() validate $address.
$self->_userdel($curproc, $command_args, $uc_normal_args);
$self->_useradd($curproc, $command_args, $uc_digest_args);
}
@@ -173,7 +172,6 @@ sub _digest_off
maplist => $digest_recipient_maps,
};
- # XXX-TODO: we expect userdel() and useradd() validate $address.
$self->_userdel($curproc, $command_args, $uc_digest_args);
$self->_useradd($curproc, $command_args, $uc_normal_args);
}
diff --git a/fml/lib/FML/Command/Admin/off.pm b/fml/lib/FML/Command/Admin/off.pm
index 466a85ad..cac0acb1 100644
--- a/fml/lib/FML/Command/Admin/off.pm
+++ b/fml/lib/FML/Command/Admin/off.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: off.pm,v 1.6 2003/01/25 12:48:39 fukachan Exp $
+# $FML: off.pm,v 1.7 2003/02/13 13:34:26 fukachan Exp $
#
package FML::Command::Admin::off;
@@ -76,7 +76,6 @@ sub process
};
my $r = '';
- # XXX-TODO: we expect userdel() validates $address.
eval q{
use FML::Command::UserControl;
my $obj = new FML::Command::UserControl;
diff --git a/fml/lib/FML/Command/Admin/on.pm b/fml/lib/FML/Command/Admin/on.pm
index 661fd91c..5efbdf1e 100644
--- a/fml/lib/FML/Command/Admin/on.pm
+++ b/fml/lib/FML/Command/Admin/on.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: on.pm,v 1.5 2002/12/20 03:40:12 fukachan Exp $
+# $FML: on.pm,v 1.6 2003/01/25 12:48:39 fukachan Exp $
#
package FML::Command::Admin::on;
@@ -79,7 +79,6 @@ sub process
};
my $r = '';
- # XXX-TODO: we expect useradd() validates $address.
eval q{
use FML::Command::UserControl;
my $obj = new FML::Command::UserControl;
diff --git a/fml/lib/FML/Command/Admin/subscribe.pm b/fml/lib/FML/Command/Admin/subscribe.pm
index 7438c270..a5c5d55e 100644
--- a/fml/lib/FML/Command/Admin/subscribe.pm
+++ b/fml/lib/FML/Command/Admin/subscribe.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: subscribe.pm,v 1.19 2002/12/20 03:40:12 fukachan Exp $
+# $FML: subscribe.pm,v 1.20 2003/01/25 12:48:39 fukachan Exp $
#
package FML::Command::Admin::subscribe;
@@ -80,7 +80,6 @@ sub process
};
my $r = '';
- # XXX-TODO: we expect useradd() validates $address.
eval q{
use FML::Command::UserControl;
my $obj = new FML::Command::UserControl;
diff --git a/fml/lib/FML/Command/Admin/unsubscribe.pm b/fml/lib/FML/Command/Admin/unsubscribe.pm
index b1970b52..44bdd545 100644
--- a/fml/lib/FML/Command/Admin/unsubscribe.pm
+++ b/fml/lib/FML/Command/Admin/unsubscribe.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: unsubscribe.pm,v 1.19 2003/01/25 12:48:39 fukachan Exp $
+# $FML: unsubscribe.pm,v 1.20 2003/01/29 13:32:31 fukachan Exp $
#
package FML::Command::Admin::unsubscribe;
@@ -83,7 +83,6 @@ sub process
};
my $r = '';
- # XXX-TODO: we expect userdel() validates $address.
eval q{
use FML::Command::UserControl;
my $obj = new FML::Command::UserControl;
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 };