aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-08-30 10:39:31 +0200
committerregnat <rg@regnat.ovh>2021-08-30 10:48:05 +0200
commitb2bce915adc6b1290494388b8c73b89c253629fb (patch)
treee522e872e7e6bbdb814e2e8005f8d9e9d9a4ae17
parentd9ba3385a9aa5ae18fc9310f827cff95f00ce9f3 (diff)
Don’t accept experimental features from the client
If the client sends an “experimental features” setting, just ignore it
-rw-r--r--src/libstore/daemon.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index d68ff64d7..487416a13 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -227,6 +227,12 @@ struct ClientSettings
try {
if (name == "ssh-auth-sock") // obsolete
;
+ else if (name == settings.experimentalFeatures.name) {
+ // We don’t want to forward the experimental features to
+ // the daemon, as that could cause some pretty weird stuff
+ if (tokenizeString<Strings>(value) != settings.experimentalFeatures.get())
+ debug("Ignoring the client-specified experimental features");
+ }
else if (trusted
|| name == settings.buildTimeout.name
|| name == "connect-timeout"