feat: Sanitize environment variables (#1192)

This commit is contained in:
Kroese
2026-07-03 17:14:59 +02:00
committed by GitHub
parent d5821cd782
commit f45b308c78
9 changed files with 53 additions and 3 deletions
+5
View File
@@ -8,6 +8,11 @@ set -Eeuo pipefail
: "${DISPLAY:="none"}" # Display type
: "${RENDERNODE:="/dev/dri/renderD128"}" # Render node
# Sanitize variables
VGA=$(strip "$VGA")
DISPLAY=$(strip "$DISPLAY")
RENDERNODE=$(strip "$RENDERNODE")
CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}')
if ! enabled "$GPU" || [[ "$CPU_VENDOR" != "GenuineIntel" || "$ARCH" != "amd64" ]]; then