aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-01 23:24:51 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-01 23:24:51 +0100
commit7271a0cc2fd0f2ba2ad9a3308e3d9f38b194f258 (patch)
tree37ef4d2996c1793b09512eb08f06f7fa0685eda9
parent9f8b511e9014253b5ea2d4548626d6971aabfc33 (diff)
downloadnar-herder-7271a0cc2fd0f2ba2ad9a3308e3d9f38b194f258.tar
nar-herder-7271a0cc2fd0f2ba2ad9a3308e3d9f38b194f258.tar.gz
Add check for known hash when responding to /nar requests
-rw-r--r--nar-herder/server.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/nar-herder/server.scm b/nar-herder/server.scm
index b3418cc..fa0b2f0 100644
--- a/nar-herder/server.scm
+++ b/nar-herder/server.scm
@@ -401,7 +401,8 @@
(uri-encode filename)))))
#f)))
(let ((cached-narinfo-file
- (and compression-symbol
+ (and narinfo ; must be a known hash
+ compression-symbol ; must be a known compression
;; Check that the filename given in the
;; request matches the narinfo store-path
(string=? filename