Author: Kevin Schoon [me@kevinschoon.com]
Hash: 1bd83a1335afa8ef289dec9fb5982c79e4197158
Timestamp: Tue, 27 Aug 2024 11:32:57 +0000 (1 month ago)

+2 -3 +/-1 browse
allow cloning of hidden repositories
allow cloning of hidden repositories

It is still possible to clone repositories now that are marked as hidden.
Basic authentication at the proxy layer can still be used to prevent access.
1diff --git a/ayllu/src/web2/routes/git.rs b/ayllu/src/web2/routes/git.rs
2index 8c28c8c..eddde5a 100644
3--- a/ayllu/src/web2/routes/git.rs
4+++ b/ayllu/src/web2/routes/git.rs
5 @@ -81,9 +81,8 @@ pub async fn handle(
6 headers: HeaderMap,
7 body: Body,
8 ) -> Result<Response, Error> {
9- if !cfg.git.smart_http || preamble.hidden {
10- // if the smart_http server is disabled or the repository is hidden
11- // always return 404.
12+ if !cfg.git.smart_http {
13+ // if the smart_http server is disabled always return 404.
14 return Err(Error::NotFound("repository not found".to_string()));
15 }
16