Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not try to parse an ip4 address as an ipv6 address #23

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Mail/SPF/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ sub ip_address_reverse {
or throw Mail::SPF::EInvalidOptionValue('NetAddr::IP IPv4 or IPv6 address expected');
try {
# Treat IPv4-mapped IPv6 addresses as IPv4 addresses:
$ip_address = $self->ipv6_address_to_ipv4($ip_address);
if($ip_address->version == 6) {
$ip_address = $self->ipv6_address_to_ipv4($ip_address);
}
}
catch Mail::SPF::EInvalidOptionValue with {};
# ...deliberately ignoring conversion errors.
Expand Down
Loading