[2/2] Pakfire: do not leak upstream proxy password in log messages

Message ID 34570e9e-b21d-52aa-5cb1-8f6477feeae4@ipfire.org
State Accepted
Commit cf33650eb354795b7a5a19bf356f563908075cca
Headers
Series [1/2] Pakfire: fix upstream proxy usage |

Commit Message

Peter Müller April 11, 2020, 10:20 a.m. UTC
  Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 src/pakfire/lib/functions.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer April 11, 2020, 10:44 a.m. UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 11 Apr 2020, at 11:20, Peter Müller <peter.mueller@ipfire.org> wrote:
> 
> Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
> ---
> 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'}/");
> 			}
> -- 
> 2.16.4
  

Patch

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'}/");
 			}