[freeside-commits] freeside/FS/FS svc_acct.pm,1.322,1.323
Ivan,,,
ivan at wavetail.420.am
Tue Jan 10 20:32:55 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv24618
Modified Files:
svc_acct.pm
Log Message:
better error reporting for illegal usernames
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.322
retrieving revision 1.323
diff -u -w -d -r1.322 -r1.323
--- svc_acct.pm 19 Dec 2011 01:59:14 -0000 1.322
+++ svc_acct.pm 11 Jan 2012 04:32:53 -0000 1.323
@@ -1182,40 +1182,42 @@
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;
}
More information about the freeside-commits
mailing list