From 41dc74a545f083211b6229f9614ab0cf146c5e47 Mon Sep 17 00:00:00 2001 From: poka Date: Mon, 5 Oct 2020 09:17:29 +0200 Subject: [PATCH] Explorer: Security fix when loading functions --- explorer.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/explorer.sh b/explorer.sh index 3fefd16..5d19069 100755 --- a/explorer.sh +++ b/explorer.sh @@ -137,6 +137,5 @@ anniversary() { # Load functions case $cmd in '') day;; - *) $cmd;; + *) [[ $(type -t $cmd) == "function" ]] && $cmd || (echo -e "$cmd: Commande inconnue\n" && helpOpt);; esac -