GP-1057: Preventing Ghidra from launching when path contains !. Also

updating Installation Guide's "Known Issues" section.
This commit is contained in:
Ryan Kurtz 2021-06-17 14:43:18 -04:00
parent 11149b9ef2
commit 38edc05f81
10 changed files with 73 additions and 39 deletions

View file

@ -64,6 +64,12 @@ SERVICE_NAME=org.rzo.yajsw.$APP_NAME
SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
SCRIPT_DIR="${SCRIPT_FILE%/*}"
# Ensure Ghidra path doesn't contain illegal characters
if [[ "$SCRIPT_DIR" = *"!"* ]]; then
echo "Ghidra path cannot contain a \"!\" character."
exit 1
fi
# YAJSW likes absolute paths
cd "${SCRIPT_DIR}"
SCRIPT_DIR="$(pwd)"

View file

@ -86,7 +86,15 @@ if [[ ${INDEX} -lt 5 ]]; then
exit 1
fi
# Sets SUPPORT_DIR to the directory that contains this file (launch.sh)
SUPPORT_DIR="${0%/*}"
# Ensure Ghidra path doesn't contain illegal characters
if [[ "$SUPPORT_DIR" = *"!"* ]]; then
echo "Ghidra path cannot contain a \"!\" character."
exit 1
fi
if [ -f "${SUPPORT_DIR}/launch.properties" ]; then
# Production Environment