File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,12 @@ if [[ "$TELEMETRY" == "true" && ("$MODE" == "frontend" || "$MODE" == "standalone
7979 if [ " $ENABLE_ID_OBFUSCATION " == " true" ]; then
8080 sed -i s/\$ enable_id_obfuscation\ =\ .* \; /\$ enable_id_obfuscation\ =\ true\; /g /var/www/html/results/telemetry_settings.php
8181 if [ ! -z " $OBFUSCATION_SALT " ]; then
82- echo " <?php" > /var/www/html/results/idObfuscation_salt.php
83- echo " \$ OBFUSCATION_SALT = $OBFUSCATION_SALT ;" >> /var/www/html/results/idObfuscation_salt.php
82+ if [[ " $OBFUSCATION_SALT " =~ ^0x[0-9a-fA-F]+$ ]]; then
83+ echo " <?php" > /var/www/html/results/idObfuscation_salt.php
84+ echo " \$ OBFUSCATION_SALT = $OBFUSCATION_SALT ;" >> /var/www/html/results/idObfuscation_salt.php
85+ else
86+ echo " WARNING: Invalid OBFUSCATION_SALT format. It must be a hex string (e.g., 0x1234abcd). Using random salt." >&2
87+ fi
8488 fi
8589 fi
8690
You can’t perform that action at this time.
0 commit comments