[freeside-commits] freeside/FS/FS Conf.pm, 1.395, 1.396 svc_acct.pm, 1.302, 1.303
Ivan,,,
ivan at wavetail.420.am
Wed Nov 3 13:23:36 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv8499
Modified Files:
Conf.pm svc_acct.pm
Log Message:
add username-slash and username-equals config options, allow uumlauts etc. in svc_acct.finger like ut_name, RT#10452, RT#10454
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.395
retrieving revision 1.396
diff -u -w -d -r1.395 -r1.396
--- Conf.pm 2 Nov 2010 01:52:59 -0000 1.395
+++ Conf.pm 3 Nov 2010 20:23:33 -0000 1.396
@@ -1627,6 +1627,20 @@
},
{
+ 'key' => 'username-slash',
+ 'section' => 'username',
+ 'description' => 'Allow the slash character (/) in usernames.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'username-equals',
+ 'section' => 'username',
+ 'description' => 'Allow the equal sign character (=) in usernames.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'safe-part_bill_event',
'section' => 'UI',
'description' => 'Validates invoice event expressions against a preset list. Useful for webdemos, annoying to powerusers.',
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.302
retrieving revision 1.303
diff -u -w -d -r1.302 -r1.303
--- svc_acct.pm 16 Sep 2010 16:07:36 -0000 1.302
+++ svc_acct.pm 3 Nov 2010 20:23:34 -0000 1.303
@@ -9,6 +9,7 @@
$username_ampersand $username_letter $username_letterfirst
$username_noperiod $username_nounderscore $username_nodash
$username_uppercase $username_percent $username_colon
+ $username_slash $username_equals
$password_noampersand $password_noexclamation
$warning_template $warning_from $warning_subject $warning_mimetype
$warning_cc
@@ -74,6 +75,8 @@
$username_ampersand = $conf->exists('username-ampersand');
$username_percent = $conf->exists('username-percent');
$username_colon = $conf->exists('username-colon');
+ $username_slash = $conf->exists('username-slash');
+ $username_equals = $conf->exists('username-equals');
$password_noampersand = $conf->exists('password-noexclamation');
$password_noexclamation = $conf->exists('password-noexclamation');
$dirhash = $conf->config('dirhash') || 0;
@@ -1241,7 +1244,7 @@
my $ulen = $usernamemax || $self->dbdef_table->column('username')->length;
if ( $username_uppercase ) {
- $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;
} else {
@@ -1273,6 +1276,12 @@
unless ( $username_colon ) {
$recref->{username} =~ /\:/ and return gettext('illegal_username');
}
+ unless ( $username_slash ) {
+ $recref->{username} =~ /\// and return gettext('illegal_username');
+ }
+ unless ( $username_equals ) {
+ $recref->{username} =~ /\=/ and return gettext('illegal_username');
+ }
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
$recref->{popnum} = $1;
@@ -1352,7 +1361,7 @@
}
}
$self->getfield('finger') =~
- /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\'\"\,\.\?\/\*\<\>]*)$/
+ /^([µ_0123456789aAáÁàÀâÂåÅäÄãêæÆbBcCçÇdDðÐeEéÉèÈêÊëËfFgGhHiIíÍìÌîÎïÏjJkKlLmMnNñÑoOóÓòÒôÔöÖõÕøغpPqQrRsSßtTuUúÚùÙûÛüÜvVwWxXyYýÝÿzZþÞ \t\!\@\#\$\%\&\(\)\-\+\;\'\"\,\.\?\/\*\<\>]*)$/
or return "Illegal finger: ". $self->getfield('finger');
$self->setfield('finger', $1);
More information about the freeside-commits
mailing list