[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 59c3510741fabaa79f3007202f2ec314cdd2761b

Ivan ivan at 420.am
Mon Apr 29 18:52:44 PDT 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  59c3510741fabaa79f3007202f2ec314cdd2761b (commit)
      from  a03ef407980e86079b82383069c5bef037bac2d5 (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 59c3510741fabaa79f3007202f2ec314cdd2761b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Apr 29 18:52:43 2013 -0700

    allow @domain to be passed as part of a white/black-list, RT#20896

diff --git a/FS/FS/part_export/http_status.pm b/FS/FS/part_export/http_status.pm
index 06b1bc0..93dd941 100644
--- a/FS/FS/part_export/http_status.pm
+++ b/FS/FS/part_export/http_status.pm
@@ -128,7 +128,7 @@ sub export_setstatus_listdel {
 }
 
 sub export_setstatus_listX {
-  my( $self, $svc_x, $action, $list, $address ) = @_;
+  my( $self, $svc_x, $action, $list, $address_item ) = @_;
 
   my $option;
   if ( $list =~ /^[WA]/i ) { #Whitelist/Allow
@@ -138,8 +138,16 @@ sub export_setstatus_listX {
   }
   $option .= $action. '_url';
 
-  $address = Email::Valid->address($address)
-    or die "address failed $Email::Valid::Details check.\n";
+  my $address;
+  unless ( $address = Email::Valid->address($address_item) ) {
+
+    if ( $address_item =~ /^(\@[\w\-\.]+\.\w{2,63})$/ ) { # "@domain"
+      $address = $1;
+    } else {
+      die "address failed $Email::Valid::Details check.\n";
+    }
+
+  }
 
   #some false laziness w/export_getstatus above
   my $url;

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

Summary of changes:
 FS/FS/part_export/http_status.pm |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list