From 4170c0b993661eb92d7708e126e7c19cf3dc968d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hromada?= Date: Sat, 21 Nov 2020 20:53:49 +0100 Subject: [PATCH] Don't fill $SERVICE as username in service_url() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The URL generated by this plugin is invalid, but since Redis on versions 5 and lower didn't have a notion of usernames, it pretty much went unnoticed. Let's fix this by not setting the $SERVICE as the username in the service_url returned by this plugin. I believe that clients ignore the username (otherwise the Redis connection wouldn't go through), so this should be a non-breaking change. Fixes #155 --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index 782b7c1..a5d50df 100755 --- a/functions +++ b/functions @@ -155,5 +155,5 @@ service_url() { local SERVICE="$1" local PASSWORD="$(service_password "$SERVICE")" local SERVICE_DNS_HOSTNAME="$(service_dns_hostname "$SERVICE")" - echo "$PLUGIN_SCHEME://$SERVICE:$PASSWORD@$SERVICE_DNS_HOSTNAME:${PLUGIN_DATASTORE_PORTS[0]}" + echo "$PLUGIN_SCHEME://:$PASSWORD@$SERVICE_DNS_HOSTNAME:${PLUGIN_DATASTORE_PORTS[0]}" }