[freeside-commits] branch master updated. d02079cf51058085a7e62c33d747b141fe0a1c89

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


The branch, master has been updated
       via  d02079cf51058085a7e62c33d747b141fe0a1c89 (commit)
      from  41466beaadfad0627adf5559d173e1bcc2829939 (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 d02079cf51058085a7e62c33d747b141fe0a1c89
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Apr 29 18:52:42 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 80139e7..5c4a8d0 100644
--- a/FS/FS/part_export/http_status.pm
+++ b/FS/FS/part_export/http_status.pm
@@ -129,7 +129,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
@@ -139,8 +139,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