[freeside-commits] branch FREESIDE_2_3_BRANCH updated. b13e93e2d39a361eff97a4edf5a391535dd5012e
Ivan
ivan at 420.am
Mon Jan 28 22:50:25 PST 2013
The branch, FREESIDE_2_3_BRANCH has been updated
via b13e93e2d39a361eff97a4edf5a391535dd5012e (commit)
from 2ea84e664770f64211c3b6c0f139d82973aad7c7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b13e93e2d39a361eff97a4edf5a391535dd5012e
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Jan 28 22:50:24 2013 -0800
username-exclamation, RT#18227
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 3f1e743..dc3d693 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5063,6 +5063,13 @@ and customer address. Include units.',
'type' => 'checkbox',
},
+ {
+ 'key' => 'username-exclamation',
+ 'section' => 'username',
+ 'description' => 'Allow the exclamation character (!) in usernames.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'ie-compatibility_mode',
'section' => 'UI',
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 7ce79ae..b09c587 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -14,6 +14,7 @@ use vars qw( $DEBUG $me $conf $skip_fuzzyfiles
$username_noperiod $username_nounderscore $username_nodash
$username_uppercase $username_percent $username_colon
$username_slash $username_equals $username_pound
+ $username_exclamation
$password_noampersand $password_noexclamation
$warning_template $warning_from $warning_subject $warning_mimetype
$warning_cc
@@ -84,6 +85,7 @@ FS::UID->install_callback( sub {
$username_slash = $conf->exists('username-slash');
$username_equals = $conf->exists('username-equals');
$username_pound = $conf->exists('username-pound');
+ $username_exclamation = $conf->exists('username-exclamation');
$password_noampersand = $conf->exists('password-noexclamation');
$password_noexclamation = $conf->exists('password-noexclamation');
$dirhash = $conf->config('dirhash') || 0;
@@ -1181,7 +1183,7 @@ sub check {
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;
@@ -1222,6 +1224,9 @@ sub check {
unless ( $username_pound ) {
$recref->{username} =~ /\#/ and return $uerror;
}
+ unless ( $username_exclamation ) {
+ $recref->{username} =~ /\!/ and return $uerror;
+ }
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 7 +++++++
FS/FS/svc_acct.pm | 7 ++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list