Skip to content

Commit 30268bc

Browse files
committed
Use git-shell in 'gitreceive run'.
gitreceive currently allows users to execute arbitrary commands on the system eg: ssh git@whatever /bin/bash This patch uses git-shell to evaluate the command sent by remote users, restricting command execution to git-related programs.
1 parent 783af2e commit 30268bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎gitreceive‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ EOF
5656
cat | $SELF hook
5757
EOF
5858
chmod +x $PRERECEIVE_HOOK
59-
eval $SSH_ORIGINAL_COMMAND
59+
eval "git-shell -c \"$SSH_ORIGINAL_COMMAND\""
6060
;;
6161

6262
hook)

0 commit comments

Comments
 (0)