Update docker/entrypoint.sh

Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com>
This commit is contained in:
sstidl 2025-10-18 11:34:14 +02:00 committed by GitHub
parent fd06e94de3
commit 64e4c3b768
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,8 +79,12 @@ if [[ "$TELEMETRY" == "true" && ("$MODE" == "frontend" || "$MODE" == "standalone
if [ "$ENABLE_ID_OBFUSCATION" == "true" ]; then
sed -i s/\$enable_id_obfuscation\ =\ .*\;/\$enable_id_obfuscation\ =\ true\;/g /var/www/html/results/telemetry_settings.php
if [ ! -z "$OBFUSCATION_SALT" ]; then
echo "<?php" > /var/www/html/results/idObfuscation_salt.php
echo "\$OBFUSCATION_SALT = $OBFUSCATION_SALT;" >> /var/www/html/results/idObfuscation_salt.php
if [[ "$OBFUSCATION_SALT" =~ ^0x[0-9a-fA-F]+$ ]]; then
echo "<?php" > /var/www/html/results/idObfuscation_salt.php
echo "\$OBFUSCATION_SALT = $OBFUSCATION_SALT;" >> /var/www/html/results/idObfuscation_salt.php
else
echo "WARNING: Invalid OBFUSCATION_SALT format. It must be a hex string (e.g., 0x1234abcd). Using random salt." >&2
fi
fi
fi