From d98eb758b55ee990cf81978b6ef8b0b2b5a13f20 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Fri, 28 Oct 2022 16:33:41 +0300 Subject: [PATCH] Fix Bug 59483 - Fix port parsing from amqp_uri (#529) * Fix port parsing from amqp_uri * Correct regex for port parsing --- run-document-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-document-server.sh b/run-document-server.sh index fd183a3..f290e8d 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -199,7 +199,7 @@ parse_rabbitmq_url(){ # extract the host local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)" # by request - try to extract the port - local port="$(echo $hostport | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')" + local port="$(echo $hostport | grep : | sed -r 's_^.*:+|/.*$__g')" local host if [ -n "$port" ]; then