http-push.c::lock_remote(): validate all remote refs.
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>
Eygene Ryabinkin committed
Feb 28, 2007 at 12:12 UTC
2c46759db757eb742590e8547cb0c63e8bdb1da1
1 file changed
+1
-1
http-push.c
+1
-1
@@ -1295,7 +1295,7 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
1295
sprintf(url, "%s%s", remote->url, path);
1296
1297
/* Make sure leading directories exist for the remote ref */
1298
- ep = strchr(url + strlen(remote->url) + 11, '/');
1298
+ ep = strchr(url + strlen(remote->url) + 1, '/');
1299
while (ep) {
1300
*ep = 0;
1301
slot = get_active_slot();