[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 4ec5b193c5234d54b7c676e21927d7de934258e5
Ivan
ivan at 420.am
Mon Apr 9 18:05:00 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 4ec5b193c5234d54b7c676e21927d7de934258e5 (commit)
via dbd9550c7379a9d8881e33ec84ce2d6701995806 (commit)
from 8824f2dc4410251c89e4913c713ceb11bb312e88 (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 4ec5b193c5234d54b7c676e21927d7de934258e5
Merge: dbd9550 8824f2d
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Apr 9 18:04:57 2012 -0700
Merge branch 'FREESIDE_2_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_2_3_BRANCH
commit dbd9550c7379a9d8881e33ec84ce2d6701995806
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Apr 9 18:04:47 2012 -0700
show illegal usernames in error messages, backport from HEAD
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 28c0197..e67db43 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -1185,40 +1185,42 @@ sub check {
or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username};
$recref->{username} = $1;
+ my $uerror = gettext('illegal_username'). ': '. $recref->{username};
+
unless ( $username_uppercase ) {
- $recref->{username} =~ /[A-Z]/ and return gettext('illegal_username');
+ $recref->{username} =~ /[A-Z]/ and return $uerror;
}
if ( $username_letterfirst ) {
- $recref->{username} =~ /^[a-z]/ or return gettext('illegal_username');
+ $recref->{username} =~ /^[a-z]/ or return $uerror;
} elsif ( $username_letter ) {
- $recref->{username} =~ /[a-z]/ or return gettext('illegal_username');
+ $recref->{username} =~ /[a-z]/ or return $uerror;
}
if ( $username_noperiod ) {
- $recref->{username} =~ /\./ and return gettext('illegal_username');
+ $recref->{username} =~ /\./ and return $uerror;
}
if ( $username_nounderscore ) {
- $recref->{username} =~ /_/ and return gettext('illegal_username');
+ $recref->{username} =~ /_/ and return $uerror;
}
if ( $username_nodash ) {
- $recref->{username} =~ /\-/ and return gettext('illegal_username');
+ $recref->{username} =~ /\-/ and return $uerror;
}
unless ( $username_ampersand ) {
- $recref->{username} =~ /\&/ and return gettext('illegal_username');
+ $recref->{username} =~ /\&/ and return $uerror;
}
unless ( $username_percent ) {
- $recref->{username} =~ /\%/ and return gettext('illegal_username');
+ $recref->{username} =~ /\%/ and return $uerror;
}
unless ( $username_colon ) {
- $recref->{username} =~ /\:/ and return gettext('illegal_username');
+ $recref->{username} =~ /\:/ and return $uerror;
}
unless ( $username_slash ) {
- $recref->{username} =~ /\// and return gettext('illegal_username');
+ $recref->{username} =~ /\// and return $uerror;
}
unless ( $username_equals ) {
- $recref->{username} =~ /\=/ and return gettext('illegal_username');
+ $recref->{username} =~ /\=/ and return $uerror;
}
unless ( $username_pound ) {
- $recref->{username} =~ /\#/ and return gettext('illegal_username');
+ $recref->{username} =~ /\#/ and return $uerror;
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/svc_acct.pm | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
More information about the freeside-commits
mailing list