Skip to content

Commit

Permalink
triton-dehydrated#14 new dehydrated version requires hook script safety
Browse files Browse the repository at this point in the history
  • Loading branch information
bahamat authored and arekinath committed Oct 9, 2018
1 parent ca814fe commit d7cdefb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cns-hook
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ if [[ -f "${BASEDIR}/override-hook" ]]; then
source "${BASEDIR}/override-hook"
fi

handler=$1
# Protection for unknown functions, required by dehydrated.
valid_passthrough_hooks=$(grep function ${BASEDIR}/cns-hook-util | awk '{print $2}')
handler="$1"
shift
$handler $@
if grep "$handler" <<< "$valid_passthrough_hooks"; then
"$handler" "$@"
fi

0 comments on commit d7cdefb

Please sign in to comment.