Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
receive-pack: reject invalid refnames
author
Martin Koegler
<mkoegler@auto.tuwien.ac.at>
Fri, 4 Jan 2008 19:37:17 +0000
(20:37 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 4 Jan 2008 23:59:43 +0000
(15:59 -0800)
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
receive-pack.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
872c930
)
diff --git
a/receive-pack.c
b/receive-pack.c
index d0a563df6457a6fc5b40b3502582a78fafdadd53..326749583221d0f5e81f58608a23ab1dc1601177 100644
(file)
--- a/
receive-pack.c
+++ b/
receive-pack.c
@@
-165,7
+165,8
@@
static const char *update(struct command *cmd)
unsigned char *new_sha1 = cmd->new_sha1;
struct ref_lock *lock;
- if (!prefixcmp(name, "refs/") && check_ref_format(name + 5)) {
+ /* only refs/... are allowed */
+ if (prefixcmp(name, "refs/") || check_ref_format(name + 5)) {
error("refusing to create funny ref '%s' remotely", name);
return "funny refname";
}