[freeside-commits] freeside/FS/FS/cust_main Import.pm, 1.5.4.1, 1.5.4.2

Ivan,,, ivan at wavetail.420.am
Wed Aug 11 14:54:26 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv464

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	Import.pm 
Log Message:
at least show an error for bad pkgparts instead of a hang, RT#9578

Index: Import.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Import.pm,v
retrieving revision 1.5.4.1
retrieving revision 1.5.4.2
diff -u -w -d -r1.5.4.1 -r1.5.4.2
--- Import.pm	9 Apr 2010 08:18:35 -0000	1.5.4.1
+++ Import.pm	11 Aug 2010 21:54:24 -0000	1.5.4.2
@@ -328,6 +328,12 @@
     tie my %hash, 'Tie::RefHash'; #this part is important
 
     if ( $cust_pkg{'pkgpart'} ) {
+
+      unless ( $cust_pkg{'pkgpart'} =~ /^\d+$/ ) {
+        $dbh->rollback if $oldAutoCommit;
+        return 'illegal pkgpart: '. $cust_pkg{'pkgpart'};
+      }
+
       my $cust_pkg = new FS::cust_pkg ( \%cust_pkg );
 
       my @svc_x = ();



More information about the freeside-commits mailing list