[freeside-commits] branch master updated. 03c5dc73291c514d7373d3a15d671018edeb9568

Jonathan Prykop jonathan at 420.am
Tue Nov 10 21:21:09 PST 2015


The branch, master has been updated
       via  03c5dc73291c514d7373d3a15d671018edeb9568 (commit)
      from  8e5113043fd4116e4bfd355807223b7239609c9e (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 03c5dc73291c514d7373d3a15d671018edeb9568
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Nov 10 23:20:55 2015 -0600

    RT#38597: OQM - svc Circuit use and setup [fixed sql quoting]

diff --git a/FS/FS/svc_circuit.pm b/FS/FS/svc_circuit.pm
index 408bd79..1a42efa 100644
--- a/FS/FS/svc_circuit.pm
+++ b/FS/FS/svc_circuit.pm
@@ -6,7 +6,7 @@ use base qw(
   FS::MAC_Mixin
   FS::svc_Common
 );
-use FS::Record qw( qsearch qsearchs );
+use FS::Record qw( dbh qsearch qsearchs );
 use FS::circuit_provider;
 use FS::circuit_type;
 use FS::circuit_termination;
@@ -221,9 +221,9 @@ sub label {
 sub search_sql {
   my ($class, $string) = @_;
   my @where = ();
-  push @where, 'LOWER(svc_circuit.circuit_id) = \''.lc($string).'\'';
-  push @where, 'LOWER(circuit_provider.provider) = \''.lc($string).'\'';
-  push @where, 'LOWER(circuit_type.typename) = \''.lc($string).'\'';
+  push @where, 'LOWER(svc_circuit.circuit_id) = ' . dbh->quote($string);
+  push @where, 'LOWER(circuit_provider.provider) = ' . dbh->quote($string);
+  push @where, 'LOWER(circuit_type.typename) = ' . dbh->quote($string);
   '(' . join(' OR ', @where) . ')';
 }
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/svc_circuit.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list