freeside/FS/FS Conf.pm,1.108,1.109 svc_acct.pm,1.164,1.165
ivan
ivan at pouncequick.420.am
Thu Nov 25 22:50:16 PST 2004
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv28818
Modified Files:
Conf.pm svc_acct.pm
Log Message:
add password-noampersand and password-noexlamation config files, patch from Stephpen Bechard, closes: Bug#539
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- Conf.pm 26 Oct 2004 11:26:33 -0000 1.108
+++ Conf.pm 26 Nov 2004 06:50:13 -0000 1.109
@@ -637,6 +637,20 @@
},
{
+ 'key' => 'password-noampersand',
+ 'section' => 'password',
+ 'description' => 'Disallow ampersands in passwords',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'password-noexclamation',
+ 'section' => 'password',
+ 'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'qmailmachines',
'section' => 'deprecated',
'description' => '<b>DEPRECATED</b>, add <i>qmail</i> and <i>shellcommands</i> <a href="../browse/part_export.cgi">exports</a> instead. This option used to export `/var/qmail/control/virtualdomains\', `/var/qmail/control/recipientmap\', and `/var/qmail/control/rcpthosts\'. Setting this option (even if empty) also turns on user `.qmail-extension\' file maintenance in conjunction with the <b>shellmachine</b> option.',
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- svc_acct.pm 13 Nov 2004 05:37:17 -0000 1.164
+++ svc_acct.pm 26 Nov 2004 06:50:13 -0000 1.165
@@ -7,6 +7,7 @@
$username_ampersand $username_letter $username_letterfirst
$username_noperiod $username_nounderscore $username_nodash
$username_uppercase
+ $password_noampersand $password_noexclamation
$welcome_template $welcome_from $welcome_subject $welcome_mimetype
$smtpmachine
$radius_password $radius_ip
@@ -55,6 +56,8 @@
$username_nodash = $conf->exists('username-nodash');
$username_uppercase = $conf->exists('username-uppercase');
$username_ampersand = $conf->exists('username-ampersand');
+ $password_noampersand = $conf->exists('password-noexclamation');
+ $password_noexclamation = $conf->exists('password-noexclamation');
$dirhash = $conf->config('dirhash') || 0;
if ( $conf->exists('welcome_email') ) {
$welcome_template = new Text::Template (
@@ -682,6 +685,12 @@
}
unless ( $username_ampersand ) {
$recref->{username} =~ /\&/ and return gettext('illegal_username');
+ }
+ if ( $password_noampersand ) {
+ $recref->{_password} =~ /\&/ and return gettext('illegal_password');
+ }
+ if ( $password_noexclamation ) {
+ $recref->{_password} =~ /\!/ and return gettext('illegal_password');
}
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
More information about the freeside-commits
mailing list