Skip to content

Commit

Permalink
Merge pull request #21 from digicatapult/feat/DRL-102/sanitise-input-…
Browse files Browse the repository at this point in the history
…env-vars

sanitise user input
  • Loading branch information
msterle authored Mar 21, 2024
2 parents b0fc832 + 2ddbd9a commit 75a7189
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check-envs.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ if [ ! "${POT_MOUNT_BASE}" ] ; then
POT_MOUNT_BASE=/opt/pot
echo POT_MOUNT_BASE not set, using ${POT_MOUNT_BASE}
fi
CHERIBSD_BUILD_ID=$(echo ${CHERIBSD_BUILD_ID} | sed 's/\s/_/g')
RUNNER_NAME=$(echo ${RUNNER_NAME} | sed 's/\s/_/g; s/[$*?]//g')
POT_MOUNT_BASE=$(echo ${POT_MOUNT_BASE} | sed 's/\s/_/g; s/[$*?]//g')
# Set the pot name to use underscores in place of dots (the one character pot
# names are apparently not allowed).
# FIXME: We shouldn't be allowing anything that isn't allowed in a path
# component here either.
POTNAME=$(echo ${RUNNER_NAME} | sed 's/\./_/g')
RUNNER_CONFIG_DIRECTORY=`pwd`/runners/${POTNAME}

0 comments on commit 75a7189

Please sign in to comment.