[freeside-commits] freeside/FS/FS svc_acct.pm, 1.304.2.3, 1.304.2.4 Conf.pm, 1.397.2.26, 1.397.2.27
Ivan,,,
ivan at wavetail.420.am
Tue Feb 1 02:50:22 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9735
Modified Files:
Tag: FREESIDE_2_1_BRANCH
svc_acct.pm Conf.pm
Log Message:
add username-pound config
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.397.2.26
retrieving revision 1.397.2.27
diff -u -w -d -r1.397.2.26 -r1.397.2.27
--- Conf.pm 31 Jan 2011 20:28:39 -0000 1.397.2.26
+++ Conf.pm 1 Feb 2011 10:50:19 -0000 1.397.2.27
@@ -4262,6 +4262,13 @@
],
},
+ {
+ 'key' => 'username-pound',
+ 'section' => 'username',
+ 'description' => 'Allow the pound character (#) in usernames.',
+ 'type' => 'checkbox',
+ },
+
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.304.2.3
retrieving revision 1.304.2.4
diff -u -w -d -r1.304.2.3 -r1.304.2.4
--- svc_acct.pm 1 Feb 2011 01:29:10 -0000 1.304.2.3
+++ svc_acct.pm 1 Feb 2011 10:50:18 -0000 1.304.2.4
@@ -9,7 +9,7 @@
$username_ampersand $username_letter $username_letterfirst
$username_noperiod $username_nounderscore $username_nodash
$username_uppercase $username_percent $username_colon
- $username_slash $username_equals
+ $username_slash $username_equals $username_pound
$password_noampersand $password_noexclamation
$warning_template $warning_from $warning_subject $warning_mimetype
$warning_cc
@@ -77,6 +77,7 @@
$username_colon = $conf->exists('username-colon');
$username_slash = $conf->exists('username-slash');
$username_equals = $conf->exists('username-equals');
+ $username_pound = $conf->exists('username-pound');
$password_noampersand = $conf->exists('password-noexclamation');
$password_noexclamation = $conf->exists('password-noexclamation');
$dirhash = $conf->config('dirhash') || 0;
@@ -1247,7 +1248,7 @@
my $ulen = $usernamemax || $self->dbdef_table->column('username')->length;
- $recref->{username} =~ /^([a-z0-9_\-\.\&\%\:\/\=]{$usernamemin,$ulen})$/i
+ $recref->{username} =~ /^([a-z0-9_\-\.\&\%\:\/\=\#]{$usernamemin,$ulen})$/i
or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username};
$recref->{username} = $1;
@@ -1283,6 +1284,10 @@
unless ( $username_equals ) {
$recref->{username} =~ /\=/ and return gettext('illegal_username');
}
+ unless ( $username_pound ) {
+ $recref->{username} =~ /\#/ and return gettext('illegal_username');
+ }
+
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
$recref->{popnum} = $1;
More information about the freeside-commits
mailing list