projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41466be
)
allow @domain to be passed as part of a white/black-list, RT#20896
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 30 Apr 2013 01:52:42 +0000
(18:52 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 30 Apr 2013 01:52:42 +0000
(18:52 -0700)
FS/FS/part_export/http_status.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/http_status.pm
b/FS/FS/part_export/http_status.pm
index
80139e7
..
5c4a8d0
100644
(file)
--- 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 {
}
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
my $option;
if ( $list =~ /^[WA]/i ) { #Whitelist/Allow
@@
-139,8
+139,16
@@
sub export_setstatus_listX {
}
$option .= $action. '_url';
}
$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;
#some false laziness w/export_getstatus above
my $url;