From e5cc0a47267aeae6913081376ca5f5d389507ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Mon, 1 Dec 2025 20:35:12 +0100 Subject: [PATCH] core: sanitize appname for certificate generation (#9552) * Update SSL key and certificate paths for Actual Budget * Use lowercase app name for certificate paths * revert changes at actualbudget --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> --- misc/tools.func | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index dd35c5c7f..088a6359e 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -1535,9 +1535,10 @@ check_for_gh_release() { # ------------------------------------------------------------------------------ create_self_signed_cert() { local APP_NAME="${1:-${APPLICATION}}" - local CERT_DIR="/etc/ssl/${APP_NAME}" - local CERT_KEY="${CERT_DIR}/${APP_NAME}.key" - local CERT_CRT="${CERT_DIR}/${APP_NAME}.crt" + local APP_NAME_LC=$(echo "${APP_NAME,,}" | tr -d ' ') + local CERT_DIR="/etc/ssl/${APP_NAME_LC}" + local CERT_KEY="${CERT_DIR}/${APP_NAME_LC}.key" + local CERT_CRT="${CERT_DIR}/${APP_NAME_LC}.crt" if [[ -f "$CERT_CRT" && -f "$CERT_KEY" ]]; then return 0