From 42cee916b5d0f59d81b808de0117d33245baf533 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Mon, 5 Aug 2024 16:30:31 +0100 Subject: Allow serving git repos from untrusted paths I'm setting the base path anyway, and no untrusted user controls anything in there. --- tw/system/lud.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tw/system/lud.scm') diff --git a/tw/system/lud.scm b/tw/system/lud.scm index a5b9d58e..2e0ea190 100644 --- a/tw/system/lud.scm +++ b/tw/system/lud.scm @@ -5,6 +5,7 @@ #:use-module (gnu system locale) #:use-module (gnu system nss) #:use-module (guix gexp) + #:use-module (tw packages git) #:use-module (tw services dns) #:use-module (tw services games) #:use-module (tw services nextcloud) @@ -172,7 +173,9 @@ that I just want to host somewhere.") (locations (list (nginx-location-configuration (inherit (git-http-nginx-location-configuration - (git-http-configuration (uri-path "/")))) + (git-http-configuration + (package git/unsafe-directories) + (uri-path "/")))) ;; Fix location URI -- `git-http-nginx-location-configuration' ;; adds a double slash in the beginning if `uri-path' is "/". (uri "~ (/.*)")) -- cgit v1.2.3