From 8567160596a1f5246c581980206d01dd9747b2a5 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 20 Oct 2017 10:15:12 +0200 Subject: [PATCH] evoacme: don't execute hooks with dots in file name --- evoacme/files/evoacme.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index b7e5f68c..e095dad2 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -258,8 +258,10 @@ main() { export EVOACME_CHAIN="${LIVE_CHAIN}" export EVOACME_FULLCHAIN="${LIVE_FULLCHAIN}" - for hook in $(find ${HOOKS_DIR} -type f | grep -v ".disabled$"); do - if [ -x "${hook}" ]; then + # search for files in hooks directory + for hook in $(find ${HOOKS_DIR} -type f); do + # keep only executables files, not containing a "." + if [ -x "${hook}" ] && $(basename "${hook}" | grep -vq .); then debug "Executing ${hook}" ${hook} fi