The following commit has been merged in the master branch:
commit 1bb7b7fee280b8f3dc4590bd3323c97a80c2557d
Author: Niels Thykier <[email protected]>
Date: Tue Mar 13 08:43:39 2012 +0100
L::Check: Work around bug in Email::Valid
If an email starts with "0" and is flagged invalid, try to replace the
initial 0 with a 1.
Signed-off-by: Niels Thykier <[email protected]>
diff --git a/debian/changelog b/debian/changelog
index e0f99bc..ff4b675 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,10 @@ lintian (2.5.6) UNRELEASED; urgency=low
* frontend/lintian:
+ [NT] Pass directory of the package to the collections.
+ * lib/Lintian/Check.pm:
+ + [NT] Fixed false positive "*-address-malformed" if the local
+ part of the email was "0". Thanks to Christopher Vollick for
+ the report. (Closes: #663659)
* lib/Lintian/Tag/Info.pm:
+ [NT] Fixed issue where "Experimental: no" was handled as a
"yes" when generating a tag description.
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index ceeb65f..7d3faf5 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -171,7 +171,16 @@ sub check_maintainer {
if (not $malformed and not Email::Valid->address($mail)) {
# Either not a valid email or possibly missing a comma between
# two entries.
- tag "$field-address-malformed", $maintainer;
+ $malformed = 1;
+ if ($mail =~ /^0/) {
+ # Email::Valid does not handle emails starting with "0" too
+ # well. So replace it with a "1", which Email::Valid cannot
+ # misinterpret as a "false-value".
+ my $copy = $mail;
+ $copy =~ s/^0/1/;
+ $malformed = 0 if Email::Valid->address ($copy);
+ }
+ tag "$field-address-malformed", $maintainer if $malformed;
}
if ($mail =~ /(?:localhost|\.localdomain|\.localnet)$/) {
tag "$field-address-is-on-localhost", $maintainer;
diff --git a/t/tests/fields-uploaders/debian/debian/control.in
b/t/tests/fields-uploaders/debian/debian/control.in
index 5d561d3..ecfd568 100644
--- a/t/tests/fields-uploaders/debian/debian/control.in
+++ b/t/tests/fields-uploaders/debian/debian/control.in
@@ -6,7 +6,8 @@ Uploaders: Mrs. Localhost <user@localhost>,
Mr. Weird<[email protected]>,
Malformed Email <@[email protected]>,
John A. J. Doe <[email protected]>,
- Doris Double-Email <Doris Double-Email <[email protected]>>
+ Doris Double-Email <Doris Double-Email <[email protected]>>,
+ Valid email <[email protected]>
Standards-Version: {$standards_version}
Build-Depends: debhelper (>= 9)
--
Debian package checker
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]