From patchwork Sat Apr 11 10:19:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2932 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48zrTf3qTrz3wbr for ; Sat, 11 Apr 2020 10:19:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48zrTd3W5sz2b3; Sat, 11 Apr 2020 10:19:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48zrTd2BQjz2yCf; Sat, 11 Apr 2020 10:19:33 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48zrTb027mz2xq9 for ; Sat, 11 Apr 2020 10:19:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48zrTY5MDhz2b3 for ; Sat, 11 Apr 2020 10:19:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1586600370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo4L3XoE9Q5q2P4h5yz4wciKVDBu7KmmPes5tQvEjSE=; b=5N19aOGl7MxIQ9e8iNy5o8uoTzy2pK1BMIQRFKdj1NYL/1zC27YT3UTt2AmCOCkgVlYU+L uIrOHefuLKo+pmDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1586600370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo4L3XoE9Q5q2P4h5yz4wciKVDBu7KmmPes5tQvEjSE=; b=csfOFOgcvJUu5rpfUfNAJeiZxPA/W5cEtaEA/Om5n6W8JIw9KT0jMb73iYVsXFgXkDYOYx +yHooGkG4lEDc9HhCvaEjwaAmPHYX3eOW6gR0QWDyyfMAiHVvcspwHjfk9e5Qx7muGQIwq h5IJGumUvOgYQ7j5aH2qQvUE/Hq00+4c4MpQjtd73wJH66gtdK8tAIkBa36oXAb+XFNfua 2QUpt3ZNznApSzjHEaV2DoVGMY3TJhSLSuE6MLSum5kOxMHA3HrOFTSJaR0F6cpOgcNwOa qkO57hEOAVKsPNSbsMsw1SN0TyVSBoGbnRawxCEnfmilmg5M80kMfImgjDGsyg== To: "IPFire: Development-List" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 1/2] Pakfire: fix upstream proxy usage Message-ID: <6fd2993f-d022-9bd2-b3b7-5a60e974d9b6@ipfire.org> Date: Sat, 11 Apr 2020 12:19:20 +0200 MIME-Version: 1.0 Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This patch ensures Pakfire will download updates via the configured upstream proxy (if any) for both HTTP and HTTPS. Fixes: #12357 Signed-off-by: Peter Müller --- src/pakfire/lib/functions.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 45e3427b1..17a420c33 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -161,10 +161,10 @@ sub fetchfile { if ($proxysettings{'UPSTREAM_PROXY'}) { logger("DOWNLOAD INFO: Upstream proxy: \"$proxysettings{'UPSTREAM_PROXY'}\""); if ($proxysettings{'UPSTREAM_USER'}) { - $ua->proxy([["http", "https"] => "http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/"]); + $ua->proxy(["http", "https"], "http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/"); logger("DOWNLOAD INFO: Logging in with: \"$proxysettings{'UPSTREAM_USER'}\" - \"$proxysettings{'UPSTREAM_PASSWORD'}\""); } else { - $ua->proxy([["http", "https"] => "http://$proxysettings{'UPSTREAM_PROXY'}/"]); + $ua->proxy(["http", "https"], "http://$proxysettings{'UPSTREAM_PROXY'}/"); } } From patchwork Sat Apr 11 10:20:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2933 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48zrVH0Wq6z3wbr for ; Sat, 11 Apr 2020 10:20:07 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48zrVG55C2z2r4; Sat, 11 Apr 2020 10:20:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48zrVG49v3z2y39; Sat, 11 Apr 2020 10:20:06 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48zrVD5m5dz2xq9 for ; Sat, 11 Apr 2020 10:20:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48zrVC4vPGz2Qv for ; Sat, 11 Apr 2020 10:20:03 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1586600404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kDzXTs9yUJS1+6siUbK/1C1iHJbtQH28WwE1VAjjS8c=; b=wmjkba7egWTZNp2vufIAWGxrzEcUqmE6xPGe0SDHpjyhpgeVEaeAJ5j16WLeccK6lkjGfE V+LUQwfdaxY7H/Bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1586600404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kDzXTs9yUJS1+6siUbK/1C1iHJbtQH28WwE1VAjjS8c=; b=TNNMUawb9vzNXLmr1WJuuy6k8vY55+ZMQeMZ+/Sco1JiE+rYciqg84zPKdJ4tMAQ6/S1t2 r2aZ6yO5G6lMGwTzgiix+IHqF4qknYNhd+MOCiu46RyXWyjbLoVjltHoPpPldF7xeomk1t aB/cKS/ywInfA0CpKjkn3iRbHht/bdGgmvJ7fSqM43TE/wpVyQ3DJpW41ZZoEq+VVZBi9H Aqt0v82sJGO8XBfK7qHxwbG0ZlppTRsxtNBacF44h1r3MWX9+2xCE+B3hcjSmm5sF0iCDm pkEPp6cKELk1X86BFWRui1Mht1sm9LrteMdeuXc+rmIV/fb2uFntZHPL2+F5Ww== Subject: [PATCH 2/2] Pakfire: do not leak upstream proxy password in log messages To: "IPFire: Development-List" References: <6fd2993f-d022-9bd2-b3b7-5a60e974d9b6@ipfire.org> From: =?utf-8?q?Peter_M=C3=BCller?= Message-ID: <34570e9e-b21d-52aa-5cb1-8f6477feeae4@ipfire.org> Date: Sat, 11 Apr 2020 12:20:01 +0200 MIME-Version: 1.0 In-Reply-To: <6fd2993f-d022-9bd2-b3b7-5a60e974d9b6@ipfire.org> Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Peter Müller Reviewed-by: Michael Tremer --- src/pakfire/lib/functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 17a420c33..4d5c6219a 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -162,7 +162,7 @@ sub fetchfile { logger("DOWNLOAD INFO: Upstream proxy: \"$proxysettings{'UPSTREAM_PROXY'}\""); if ($proxysettings{'UPSTREAM_USER'}) { $ua->proxy(["http", "https"], "http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/"); - logger("DOWNLOAD INFO: Logging in with: \"$proxysettings{'UPSTREAM_USER'}\" - \"$proxysettings{'UPSTREAM_PASSWORD'}\""); + logger("DOWNLOAD INFO: Logging in with \"$proxysettings{'UPSTREAM_USER'}\" against \"$proxysettings{'UPSTREAM_PROXY'}\""); } else { $ua->proxy(["http", "https"], "http://$proxysettings{'UPSTREAM_PROXY'}/"); }