[freeside-commits] freeside/FS/FS Conf.pm, 1.396, 1.397 svc_acct.pm, 1.303, 1.304
Ivan,,,
ivan at wavetail.420.am
Thu Nov 4 10:38:38 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29570
Modified Files:
Conf.pm svc_acct.pm
Log Message:
finish username-slash and username-equals, RT#10452
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -w -d -r1.396 -r1.397
--- Conf.pm 3 Nov 2010 20:23:33 -0000 1.396
+++ Conf.pm 4 Nov 2010 17:38:35 -0000 1.397
@@ -1629,7 +1629,7 @@
{
'key' => 'username-slash',
'section' => 'username',
- 'description' => 'Allow the slash character (/) in usernames.',
+ 'description' => 'Allow the slash character (/) in usernames. When using, make sure to set "Home directory" to fixed and blank in all svc_acct service definitions.',
'type' => 'checkbox',
},
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.303
retrieving revision 1.304
diff -u -w -d -r1.303 -r1.304
--- svc_acct.pm 3 Nov 2010 20:23:34 -0000 1.303
+++ svc_acct.pm 4 Nov 2010 17:38:35 -0000 1.304
@@ -1243,16 +1243,14 @@
}
my $ulen = $usernamemax || $self->dbdef_table->column('username')->length;
- if ( $username_uppercase ) {
+
$recref->{username} =~ /^([a-z0-9_\-\.\&\%\:\/\=]{$usernamemin,$ulen})$/i
or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username};
$recref->{username} = $1;
- } else {
- $recref->{username} =~ /^([a-z0-9_\-\.\&\%\:]{$usernamemin,$ulen})$/
- or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username};
- $recref->{username} = $1;
- }
+ unless ( $username_uppercase ) {
+ $recref->{username} =~ /[A-Z]/ and return gettext('illegal_username');
+ }
if ( $username_letterfirst ) {
$recref->{username} =~ /^[a-z]/ or return gettext('illegal_username');
} elsif ( $username_letter ) {
More information about the freeside-commits
mailing list