From b2bce915adc6b1290494388b8c73b89c253629fb Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 30 Aug 2021 10:39:31 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20accept=20experimental=20feature?= =?UTF-8?q?s=20from=20the=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the client sends an “experimental features” setting, just ignore it --- src/libstore/daemon.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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(value) != settings.experimentalFeatures.get()) + debug("Ignoring the client-specified experimental features"); + } else if (trusted || name == settings.buildTimeout.name || name == "connect-timeout"