freeside/FS/FS Conf.pm,1.47.4.48,1.47.4.49 svc_acct.pm,1.109.2.48,1.109.2.49

ivan ivan at pouncequick.420.am
Thu Nov 25 22:50:29 PST 2004


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv28852

Modified Files:
      Tag: FREESIDE_1_4_BRANCH
	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.47.4.48
retrieving revision 1.47.4.49
diff -u -d -r1.47.4.48 -r1.47.4.49
--- Conf.pm	15 Sep 2004 15:31:36 -0000	1.47.4.48
+++ Conf.pm	26 Nov 2004 06:50:27 -0000	1.47.4.49
@@ -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.109.2.48
retrieving revision 1.109.2.49
diff -u -d -r1.109.2.48 -r1.109.2.49
--- svc_acct.pm	16 Sep 2004 01:47:42 -0000	1.109.2.48
+++ svc_acct.pm	26 Nov 2004 06:50:27 -0000	1.109.2.49
@@ -7,6 +7,7 @@
              $username_ampersand $username_letter $username_letterfirst
              $username_noperiod $username_nounderscore $username_nodash
              $username_uppercase
+             $password_noampersand $password_noexclamation
              $mydomain
              $welcome_template $welcome_from $welcome_subject $welcome_mimetype
              $smtpmachine
@@ -58,6 +59,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');
   $mydomain = $conf->config('domain');
   $dirhash = $conf->config('dirhash') || 0;
   if ( $conf->exists('welcome_email') ) {
@@ -669,6 +672,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