Skip to content

Commit

Permalink
http-push.c::lock_remote(): validate all remote refs.
Browse files Browse the repository at this point in the history
Starting from offset 11 might have been good back when it was
only used for updating "refs/heads/*", but it is used to update
"info/refs" and "refs/tags/*" as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eygene Ryabinkin authored and Junio C Hamano committed Feb 28, 2007
1 parent cf70c16 commit 2c46759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
sprintf(url, "%s%s", remote->url, path);

/* Make sure leading directories exist for the remote ref */
ep = strchr(url + strlen(remote->url) + 11, '/');
ep = strchr(url + strlen(remote->url) + 1, '/');
while (ep) {
*ep = 0;
slot = get_active_slot();
Expand Down

0 comments on commit 2c46759

Please sign in to comment.