From 236a731da065014c4fb314566d31bf96da4ae759 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 9 Mar 2022 14:47:20 +0100 Subject: nixos/tor: admit newlines in secret key --- nixos/modules/services/security/tor.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/services/security/tor.nix') diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix index cafb44e1242..3bf70c4aa4f 100644 --- a/nixos/modules/services/security/tor.nix +++ b/nixos/modules/services/security/tor.nix @@ -962,7 +962,7 @@ in '') onion.authorizedClients ++ optional (onion.secretKey != null) '' install -d -o tor -g tor -m 0700 ${escapeShellArg onion.path} - key="$(cut -f1 -d: ${escapeShellArg onion.secretKey})" + key="$(cut -f1 -d: ${escapeShellArg onion.secretKey} | head -1)" case "$key" in ("== ed25519v"*"-secret") install -o tor -g tor -m 0400 ${escapeShellArg onion.secretKey} ${escapeShellArg onion.path}/hs_ed25519_secret_key;; -- cgit 1.4.1