Skip to content

Commit

Permalink
Fix regex to allow usernames contain zeroes
Browse files Browse the repository at this point in the history
  • Loading branch information
sn0 authored Aug 14, 2016
1 parent d4fa091 commit 859f86f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/gitprep-shell-raw
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ sub parse_ssh_original_command {
$ssh_original_command ||= '';

my $git_commands = "git-upload-pack|git-receive-pack|git-upload-archive";
if ($ssh_original_command =~ m(^($git_commands) '.*/([a-zA-Z1-9_]+)/([^\/]+?)\.git'$)) {
if ($ssh_original_command =~ m(^($git_commands) '.*/([a-zA-Z0-9_]+)/([^\/]+?)\.git'$)) {
my ($verb, $user_id, $project_id) = ($1, $2, $3);
warn "User:$user_id, Project:$project_id" if $debug;
die "invalid repo name: '$project_id'\n" if $project_id !~ $project_re;
Expand Down

0 comments on commit 859f86f

Please sign in to comment.