From 343a22a944f0300c5518e346ee1a85581741027c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 8 Oct 2021 00:31:46 +0200 Subject: [PATCH] cleaner display of activation link, include port number in activation link --- users.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/users.sh b/users.sh index c13703b..eaf4c27 100755 --- a/users.sh +++ b/users.sh @@ -151,7 +151,7 @@ user_register(){ RELEASE "$user_db" debug "Sending Activation Link:" \ - "https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")" + "https://${HTTP_HOST}${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")" sendmail -t -f "$MAILFROM" <<-EOF From: ${MAILFROM} To: ${email} @@ -161,7 +161,7 @@ user_register(){ You can activate your account using this link: - https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid") + https://${HTTP_HOST}${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid") This registration link will expire after 24 hours. @@ -220,7 +220,7 @@ user_invite(){ >>"$user_db" RELEASE "$user_db" debug "Sending Invitation Link:" \ - "https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")" + "https://${HTTP_HOST}${BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")" sendmail -t -f "$MAILFROM" <<-EOF From: ${MAILFROM} To: ${email} @@ -232,7 +232,7 @@ user_invite(){ You can create your account using this link: - https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid") + https://${HTTP_HOST}${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid") This registration link will expire after 24 hours. -- 2.39.2