mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-15 01:33:25 +01:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user