[freeside-commits] branch FREESIDE_3_BRANCH updated. 2e61cf974afbe099c31342e791e942bec70c893f
Ivan
ivan at 420.am
Tue Dec 10 12:45:14 PST 2013
The branch, FREESIDE_3_BRANCH has been updated
via 2e61cf974afbe099c31342e791e942bec70c893f (commit)
from 7d01a5cb2f6bacca1944a2666d3600c4c23585ba (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 2e61cf974afbe099c31342e791e942bec70c893f
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Dec 10 12:45:12 2013 -0800
don't generate random sip_password values if you set it to fixed+blank, RT#25239
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm
index 4b7638a..0b77a71 100644
--- a/FS/FS/svc_phone.pm
+++ b/FS/FS/svc_phone.pm
@@ -239,7 +239,7 @@ Class method which returns an SQL fragment to search for the given string.
sub search_sql {
my( $class, $string ) = @_;
- my $conf = new FS::Conf;
+ #my $conf = new FS::Conf;
if ( $conf->exists('svc_phone-allow_alpha_phonenum') ) {
$string =~ s/\W//g;
@@ -466,7 +466,11 @@ and replace methods.
sub check {
my $self = shift;
- my $conf = new FS::Conf;
+ #my $conf = new FS::Conf;
+
+ my $x = $self->setfixed;
+ return $x unless ref($x);
+ my $part_svc = $x;
my $phonenum = $self->phonenum;
my $phonenum_check_method;
@@ -548,8 +552,9 @@ sub check {
return "SIP password must be shorter than $passwordmax characters"
if length($self->sip_password) > $passwordmax;
- } else { # option for this?
+ } elsif ( $part_svc->part_svc_column('sip_password')->columnflag ne 'F' ) {
+ # option for this?
$self->sip_password(
join('', map $pw_set[ int(rand $#pw_set) ], (1..min($passwordmax,16)) )
);
@@ -650,7 +655,7 @@ sub radius_check {
my $self = shift;
my %check = ();
- my $conf = new FS::Conf;
+ #my $conf = new FS::Conf;
my $password;
if ( $conf->config('svc_phone-radius-password') eq 'countrycode_phonenum' ) {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/svc_phone.pm | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list