From 2bed20bf4e1aa0dd1b89456bcc2c282d49d49d76 Mon Sep 17 00:00:00 2001 From: Pali Date: Sun, 1 Jul 2018 01:46:03 +0200 Subject: [PATCH] Do not depend on insecure module Email::Address Module Email::Address is vulnerable to CVE-2015-7686 and new replacement is module Email::Address::XS. --- README.md | 2 +- lib/Dist/Zilla/Role/PotFile.pm | 2 +- lib/Dist/Zilla/Role/PotWriter.pm | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ * Dist::Zilla * Dist::Zilla::File::FromCode * Dist::Zilla::Role::FileGatherer -* Email::Address +* Email::Address::XS * Encode * File::Find::Rule * IPC::Cmd --- a/lib/Dist/Zilla/Role/PotFile.pm +++ b/lib/Dist/Zilla/Role/PotFile.pm @@ -129,7 +129,7 @@ Email address for reporting translation bugs. Defaults to the email address of the first author known to L, if available and parseable by -L. +L. =back --- a/lib/Dist/Zilla/Role/PotWriter.pm +++ b/lib/Dist/Zilla/Role/PotWriter.pm @@ -6,6 +6,7 @@ use strict; use warnings; use IPC::Run3; +use Email::Address::XS 1.01; use namespace::autoclean; our $VERSION = '0.91'; @@ -41,9 +42,8 @@ my $email = $p{bugs_email} || do { if (my $author = $dzil->authors->[0]) { - require Email::Address; - my ($addr) = Email::Address->parse($author); - $addr->address if $addr; + my $addr = Email::Address::XS->parse($author); + $addr->address if $addr->is_valid; } } || ''; @@ -185,7 +185,7 @@ Email address for reporting translation bugs. Defaults to the email address of the first author known to L, if available and parseable by -L. +L. =back