diff options
Diffstat (limited to 'cgit/ssh/git-shell-commands/set-description')
| -rwxr-xr-x | cgit/ssh/git-shell-commands/set-description | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cgit/ssh/git-shell-commands/set-description b/cgit/ssh/git-shell-commands/set-description index a120fa0..ea0e52e 100755 --- a/cgit/ssh/git-shell-commands/set-description +++ b/cgit/ssh/git-shell-commands/set-description @@ -9,6 +9,7 @@ fi repo_name="$1"; shift 1; [ -z "$repo_name" ] && echo "Error: empty repo name" 1>&2 && exit 1 +(echo "$repo_name" | grep -q "^[A-Za-z0-9_-]\+$" 2>/dev/null) || (echo "Error: invalid repo name" 1>&2 && exit 1) description="$*"; [ -z "$description" ] && echo "Error: empty description" 1>&2 && exit 1 |
