summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-09-11 01:27:48 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-09-11 01:27:48 -0300
commit2de9e49f22008c25fccfe79396e42e80b7c56cef (patch)
treecb5450c85ccf1fab1e7803cb0976581c1402ec42
parent34b2ef6f3896d54436c24282c39145c5ee5c45c9 (diff)
Since we're at it secure create-bare-repo too
-rwxr-xr-xgit-shell-commands/create-bare-repo2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo
index 6c83bc6..1e06580 100755
--- a/git-shell-commands/create-bare-repo
+++ b/git-shell-commands/create-bare-repo
@@ -7,7 +7,7 @@ set -e
for i in $@; do
# Cleanup names
- repo="`echo "$i" | sed "s/[^a-z0-9\._-]//gi"`"
+ repo="`echo "$repo" | sed -e "s,^[/\.]\+,,g" -e "s,[^a-z0-9\./_-],,gi"`"
if [ -z "$repo" ]; then continue; fi