commit perl-Email-Valid for openSUSE:Factory
Hello community,
here is the log from the commit of package perl-Email-Valid for openSUSE:Factory checked in at 2012-02-27 18:34:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Email-Valid (Old)
and /work/SRC/openSUSE:Factory/.perl-Email-Valid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Email-Valid", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Email-Valid/perl-Email-Valid.changes 2011-12-06 16:24:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Email-Valid.new/perl-Email-Valid.changes 2012-02-27 18:35:43.000000000 +0100
@@ -1,0 +2,17 @@
+Mon Feb 27 10:06:49 UTC 2012 - coolo@suse.com
+
+- updated to 0.187
+ addresses in the form rjbs@[1.2.3.4] are now (correctly) considered
+ valid; this can be disabled with the -allow_ip option
+ (this resolves RT#48398)
+
+ check email address length and localpart length (thanks, Steve
+ Bertrand!)
+
+ use blessed($x) instead of wrapping an ->isa called in eval{}; this
+ patch (thanks, Felipe Bergo!) was submitted to avoid problems with
+ people who have global __DIE__ handlers, but was applied to just
+ avoid the dumb eval{}; people with __DIE__ are otherwise on their
+ own, here
+
+-------------------------------------------------------------------
Old:
----
Email-Valid-0.185.tar.gz
New:
----
Email-Valid-0.187.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Email-Valid.spec ++++++
--- /var/tmp/diff_new_pack.0y7UwK/_old 2012-02-27 18:35:44.000000000 +0100
+++ /var/tmp/diff_new_pack.0y7UwK/_new 2012-02-27 18:35:44.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Email-Valid
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,26 +15,27 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: perl-Email-Valid
-Version: 0.185
+Version: 0.187
Release: 0
-License: Artistic-1.0 or GPL-1.0+
%define cpan_name Email-Valid
Summary: Check validity of Internet email addresses
-Url: http://search.cpan.org/dist/Email-Valid/
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
+Url: http://search.cpan.org/dist/Email-Valid/
Source: http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
-BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl-macros
BuildRequires: perl(Mail::Address)
BuildRequires: perl(Net::DNS)
-BuildRequires: perl(Test::More)
-BuildRequires: perl-macros
+#BuildRequires: perl(Email::Valid)
+#BuildRequires: perl(IO::CaptureOutput)
+#BuildRequires: perl(Net::Domain::TLD)
Requires: perl(Mail::Address)
Requires: perl(Net::DNS)
-Requires: perl(Test::More)
%{perl_requires}
%description
@@ -52,16 +53,13 @@
%{__make} %{?_smp_mflags}
%check
-#broken test suite %{__make} test
+#broken %{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes LICENSE README
++++++ Email-Valid-0.185.tar.gz -> Email-Valid-0.187.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Email-Valid-0.185/Changes new/Email-Valid-0.187/Changes
--- old/Email-Valid-0.185/Changes 2011-08-11 19:25:29.000000000 +0200
+++ new/Email-Valid-0.187/Changes 2012-01-27 17:23:47.000000000 +0100
@@ -1,5 +1,20 @@
Revision history for Perl extension Email::Valid.
+0.187 2012-01-27
+ addresses in the form rjbs@[1.2.3.4] are now (correctly) considered
+ valid; this can be disabled with the -allow_ip option
+ (this resolves RT #48398)
+
+ check email address length and localpart length (thanks, Steve
+ Bertrand!)
+
+0.186 2012-01-22
+ use blessed($x) instead of wrapping an ->isa called in eval{}; this
+ patch (thanks, Felipe Bergo!) was submitted to avoid problems with
+ people who have global __DIE__ handlers, but was applied to just
+ avoid the dumb eval{}; people with __DIE__ are otherwise on their
+ own, here
+
0.185 2011-08-11
do not die in t/valid.t when testing for working DNS
(address RT #70157, thanks, Alexey Tourbin)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Email-Valid-0.185/META.json new/Email-Valid-0.187/META.json
--- old/Email-Valid-0.185/META.json 2011-08-11 19:40:41.000000000 +0200
+++ new/Email-Valid-0.187/META.json 2012-01-27 17:28:09.000000000 +0100
@@ -4,7 +4,7 @@
"unknown"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150",
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.113640",
"license" : [
"perl_5"
],
@@ -34,6 +34,7 @@
"requires" : {
"Mail::Address" : 0,
"Net::DNS" : 0,
+ "Scalar::Util" : 0,
"Test::More" : 0,
"perl" : "5.006"
}
@@ -45,5 +46,5 @@
"url" : "http://github.com/rjbs/email-valid"
}
},
- "version" : "0.185"
+ "version" : "0.187"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Email-Valid-0.185/META.yml new/Email-Valid-0.187/META.yml
--- old/Email-Valid-0.185/META.yml 2011-08-11 19:40:41.000000000 +0200
+++ new/Email-Valid-0.187/META.yml 2012-01-27 17:28:08.000000000 +0100
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150'
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.113640'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,8 +20,9 @@
requires:
Mail::Address: 0
Net::DNS: 0
+ Scalar::Util: 0
Test::More: 0
perl: 5.006
resources:
repository: http://github.com/rjbs/email-valid
-version: 0.185
+version: 0.187
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Email-Valid-0.185/Makefile.PL new/Email-Valid-0.187/Makefile.PL
--- old/Email-Valid-0.185/Makefile.PL 2010-01-27 17:51:54.000000000 +0100
+++ new/Email-Valid-0.187/Makefile.PL 2012-01-22 17:12:14.000000000 +0100
@@ -22,12 +22,13 @@
WriteMakefile(
'NAME' => 'Email::Valid',
- 'VERSION_FROM' => 'lib/Email/Valid.pm',
+ 'VERSION_FROM' => 'lib/Email/Valid.pm',
MIN_PERL_VERSION => '5.006',
(eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
'PREREQ_PM' => {
'Test::More' => 0,
'Mail::Address' => 0,
+ 'Scalar::Util' => 0, # for blessed()
($need_net_dns ? ('Net::DNS' => 0) : ()),
((!$need_net_dns and $^O =~ /\AMSWin32|Cygwin\z/)
? ('IO::CaptureOutput' => 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Email-Valid-0.185/lib/Email/Valid.pm new/Email-Valid-0.187/lib/Email/Valid.pm
--- old/Email-Valid-0.185/lib/Email/Valid.pm 2011-08-11 19:36:58.000000000 +0200
+++ new/Email-Valid-0.187/lib/Email/Valid.pm 2012-01-27 17:27:00.000000000 +0100
@@ -10,10 +10,11 @@
use IO::File;
use Mail::Address;
use File::Spec;
+use Scalar::Util 'blessed';
use bytes;
-$VERSION = '0.185';
+$VERSION = '0.187';
%AUTOLOAD = (
fqdn => 1,
@@ -21,6 +22,7 @@
mxcheck => 1,
tldcheck => 1,
local_rules => 1,
+ localpart => 1,
);
$NSLOOKUP_PAT = 'preference|serial|expire|mail\s+exchanger';
@@ -56,7 +58,9 @@
$self->{tldcheck} = 0;
$self->{fudge} = 0;
$self->{fqdn} = 1;
+ $self->{allow_ip} = 1;
$self->{local_rules} = 0;
+ $self->{localpart} = 1;
$self->{details} = $Details = undef;
}
@@ -102,7 +106,7 @@
my %args = $self->_rearrange([qw( address )], \@_);
my $addr = $args{address} or return $self->details('rfc822');
- $addr = $addr->address if eval { $addr->isa('Mail::Address') };
+ $addr = $addr->address if (blessed($addr) && $addr->isa('Mail::Address'));
return $self->details('rfc822')
if $addr =~ /\P{ASCII}/ or $addr !~ m/^$RFC822PAT$/o;
@@ -234,7 +238,7 @@
my $self = shift;
my $addr = shift;
- $addr = $addr->address if eval { $addr->isa('Mail::Address') };
+ $addr = $addr->address if (blessed($addr) && $addr->isa('Mail::Address'));
my $host = ($addr =~ /^.*@(.*)$/ ? $1 : $addr);
$host =~ s/\s+//g;
@@ -279,6 +283,14 @@
1;
}
+sub _valid_local_part {
+ my ($self, $localpart) = @_;
+
+ return 0 unless $localpart and length $localpart <= 64;
+
+ return 1;
+}
+
sub _valid_domain_parts {
my ($self, $string) = @_;
@@ -312,7 +324,7 @@
local_rules )], \@_);
my $addr = $args{address} or return $self->details('rfc822');
- $addr = $addr->address if eval { $addr->isa('Mail::Address') };
+ $addr = $addr->address if (blessed($addr) && $addr->isa('Mail::Address'));
$addr = $self->_fudge( $addr ) if $args{fudge};
$self->rfc822( -address => $addr ) or return undef;
@@ -321,15 +333,29 @@
$addr or return $self->details('rfc822'); # This should never happen
+ if (length($addr->address) > 254) {
+ return $self->details('address_too_long');
+ }
+
if ($args{local_rules}) {
$self->_local_rules( $addr->user, $addr->host )
or return $self->details('local_rules');
}
- if ($args{fqdn}) {
- no warnings 'uninitialized'; # valid domain parts might return undef
- $self->_valid_domain_parts($addr->host) > 1
- or return $self->details('fqdn');
+ if ($args{localpart}) {
+ $self->_valid_local_part($addr->user) > 0
+ or return $self->details('localpart');
+ }
+
+ my $ip_ok = $args{allow_ip} && $addr->host =~ /\A\[
+ (?:[0-9]{1,3}\.){3}[0-9]{1,3}
+ /x;
+
+ if (! $ip_ok && $args{fqdn}) {
+ my $domain_parts = $self->_valid_domain_parts($addr->host);
+
+ return $self->details('fqdn')
+ unless $ip_ok || ($domain_parts && $domain_parts > 1);
}
if ($args{tldcheck}) {
@@ -510,6 +536,7 @@
-tldcheck
-fudge
-fqdn
+ -allow_ip
-local_rules
=item mx ( <ADDRESS>|<DOMAIN> )
@@ -544,11 +571,25 @@
spaces in AOL addresses, and the conversion of commas to periods in
Compuserve addresses. The default is false.
+=item allow_ip ( <TRUE>|<FALSE> )
+
+Specifies whether a "domain literal" is acceptable as the domain part. That
+means addresses like: C
participants (1)
-
root@hilbert.suse.de