Blob Blame History Raw
MIME-Version: 1.0
X-Spam-Status: No, score=-1.121 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_NEUTRAL=0.779] autolearn=no
Content-Disposition: inline
X-Cpan.org: This message routed through the cpan.org mail forwarding service.  Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-RT-Interface: API
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20190301231017.mrm4rmdrtjq6cteo@work>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.121
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 46E5D2401F3 for <cpan-bug+RPC-XML@hipster.bestpractical.com>; Fri,  1 Mar 2019 18:17:22 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z45FyKRQ-6d9 for <cpan-bug+RPC-XML@hipster.bestpractical.com>; Fri,  1 Mar 2019 18:17:21 -0500 (EST)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id C534D240052 for <bug-RPC-XML@rt.cpan.org>; Fri,  1 Mar 2019 18:17:20 -0500 (EST)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id CE8CA7C19E for <bug-RPC-XML@rt.cpan.org>; Fri,  1 Mar 2019 15:17:19 -0800 (PST)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 91E467CF8A for <bug-RPC-XML@rt.cpan.org>; Fri,  1 Mar 2019 15:17:17 -0800 (PST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id CB36E7C19E for <bug-RPC-XML@rt.cpan.org>; Fri,  1 Mar 2019 15:17:16 -0800 (PST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C540941B36 for <bug-RPC-XML@rt.cpan.org>; Sat,  2 Mar 2019 00:10:24 +0100 (CET)
Delivered-To: cpan-bug+RPC-XML@hipster.bestpractical.com
Subject: Re: [rt.cpan.org #120472]
Return-Path: <f.gruenbichler@proxmox.com>
X-Original-To: cpan-bug+RPC-XML@hipster.bestpractical.com
X-RT-Mail-Extension: rpc-xml
Date: Sat, 2 Mar 2019 00:10:17 +0100
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, INVALID_MSGID_NO_FQDN 0, SINGLE_URI_IN_BODY 0, SPF_PASS 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FROM_UTF_Q 0, __HAS_FROM 0, __HAS_MSGID 0, __HTTPS_URI 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __NO_HTML_TAG_RAW 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __zen.spamhaus.org_ERROR '
X-Spam-Level: 
X-Greylist: delayed 409 seconds by postgrey-1.34 at xx1.develooper.com; Fri, 01 Mar 2019 15:17:16 PST
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.3.1.230917
To: bug-RPC-XML@rt.cpan.org
From: Fabian Gr├╝nbichler <f.gruenbichler@proxmox.com>
RT-Message-ID: <rt-4.0.18-17075-1551482243-677.120472-0-0@rt.cpan.org>
Content-Length: 1733

the patch attached in this queue actually has a bug itself, which the
following diff (full patch/commit[1]) fixes:

it does break for IPv4 only systems where 'localhost' only resolves to
'127.0.0.1', since '127.0.0.1' cmp '127.0.0.1' == 0. in case resolve
(which ignores $res->[0]/$family) returns '::1' (or any other value) in
addition to '127.0.0.1', the problem is actually hidden since '::1' cmp
'127.0.0.1' is truthy, not false. switching to 'eq' does the right
thing, since we don't care about ordering.

1: https://salsa.debian.org/perl-team/modules/packages/librpc-xml-perl/commit/31c9c4a78dcff0beb5c19d7363848c08c9b319f9

diff --git a/t/40_server.t b/t/40_server.t
index 379b956..86c49ed 100644
--- a/t/40_server.t
+++ b/t/40_server.t
@@ -317,7 +317,7 @@ SKIP: {
         }
 
         $res = $res->value->value;
-        ok(grep({ $_ cmp $res->[3]} resolve($res->[0], 'localhost')),
+        ok(grep({ $_ eq $res->[3]} resolve($res->[0], 'localhost')),
            'Third live req: Correct IP addr from peerhost');
         is($res->[1], Socket::inet_pton($res->[0], $res->[3]),
            'Third request: peeraddr packet matches converted peerhost');
diff --git a/t/40_server_xmllibxml.t b/t/40_server_xmllibxml.t
index 8aeaece..68952f4 100644
--- a/t/40_server_xmllibxml.t
+++ b/t/40_server_xmllibxml.t
@@ -214,7 +214,7 @@ SKIP: {
         }
 
         $res = $res->value->value;
-        ok(grep({ $_ cmp $res->[3]} resolve($res->[0], 'localhost')),
+        ok(grep({ $_ eq $res->[3]} resolve($res->[0], 'localhost')),
            'Third live req: Correct IP addr from peerhost');
         is($res->[1], Socket::inet_pton($res->[0], $res->[3]),
            'Third request: peeraddr packet matches converted peerhost');