diff options
author | Masaya Suzuki <masayasuzuki@google.com> | 2018-12-18 09:20:54 -0800 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-12-24 10:58:43 +0100 |
commit | 61f0bd54d058789d73a8db0dfb8d23310aa8c411 (patch) | |
tree | 62170fe42ae3e68928d17bbc7848345e3bf96c35 /org.eclipse.jgit.ant | |
parent | c31108bcc55eaf06b2047b9ab284cbf9cd29ebf6 (diff) | |
download | jgit-61f0bd54d058789d73a8db0dfb8d23310aa8c411.tar.gz jgit-61f0bd54d058789d73a8db0dfb8d23310aa8c411.zip |
Call AdvertiseRefsHook before validating wants
AdvertiseRefsHook is used to limit the visibility of the refs in Gerrit.
If this hook is not called, then all refs are treated as visible,
causing the server to serve commits reachable from branches the client
should not be able to access, if asked to via a request naming a guessed
object id.
This bug was introduced in v2.0.0.201206130900-r~123 (Modify refs in
UploadPack/ReceivePack using a hook interface, 2012-02-08). Stateful
bidirectional transports are not affected.
Fix it by moving the AdvertiseRefsHook call to
getAdvertisedOrDefaultRefs, ensuring the hook is called in all cases.
[jn: backported to stable-4.5 by splitting out tests and the protocol v2
specific parts]
Change-Id: I159f396216354f2eda3968d17802e166d8c8ec2d
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.ant')
0 files changed, 0 insertions, 0 deletions