From patchwork Mon Apr 12 21:01:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 4151 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4FK1P96Kxkz3yBW for ; Mon, 12 Apr 2021 21:01:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4FK1P91xhSzZV; Mon, 12 Apr 2021 21:01:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4FK1P871HPz2yk9; Mon, 12 Apr 2021 21:01:16 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4FK1P74NNKz2xbr for ; Mon, 12 Apr 2021 21:01:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4FK1P649QBzZV for ; Mon, 12 Apr 2021 21:01:14 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1618261275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tM0rpHAGRiLA91kgBTSbIGRDHaTZ/hZfhXI7+FHEUws=; b=KqsD7DKLmins3+b8CrwZqwVShaRhGVx2aLRIfj0sXr82gexgpsEXLysX7m7AJCHoIdOYcz 4CC6ehhuEOvuW2CQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1618261275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tM0rpHAGRiLA91kgBTSbIGRDHaTZ/hZfhXI7+FHEUws=; b=SUMf4ucip75CtqdpqLpPBm54KwRuFf+MVg68AgUmD7tJUMQ3W5udGbiAWz8vOpkkQbK9TG agu2TbkTRoxWlw+Sw5nAiA20q6M+fZho/kV63s1KKfXOiscHTKOVsDLgYlM4ht2LMDIF9F MkisiIF1toeM2mtzCYhkSIgK8XCiiepCybp9S2QlMlMcayYwsUz4Uwvsl3W6dFzx4TgmB9 qCuCyK9Z8IE1BmPDbYGmwMmomvArucH3g/TxV8UH22Jz2vUFLUcmWXXo/CX26hDNSPWy6s gxkdomGOF2aZPTnlY/Sa0NFpFYBai//zA8ijoraBDjQ8FOxXHkRF+lYNde2rZg== Subject: [PATCH 3/4] httpd: apply the same security headers on the captive portal instance as we do elsewhere To: development@lists.ipfire.org References: <0b270dd5-9a61-2901-c75e-8698dd4373e8@ipfire.org> <8698f06c-19c9-1680-f179-4d50c00bed1a@ipfire.org> From: =?utf-8?q?Peter_M=C3=BCller?= Message-ID: <5251bce1-49af-64e5-a858-5e33210d9e6b@ipfire.org> Date: Mon, 12 Apr 2021 23:01:13 +0200 MIME-Version: 1.0 In-Reply-To: <8698f06c-19c9-1680-f179-4d50c00bed1a@ipfire.org> Content-Language: en-US X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" The Captive Portal should not be framed or leak sensitive detail via Referrers either. Signed-off-by: Peter Müller --- config/httpd/vhosts.d/captive.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/httpd/vhosts.d/captive.conf b/config/httpd/vhosts.d/captive.conf index 629fa8180..51af6eac4 100644 --- a/config/httpd/vhosts.d/captive.conf +++ b/config/httpd/vhosts.d/captive.conf @@ -11,6 +11,8 @@ Listen 1013 Header always set X-Content-Type-Options nosniff Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" + Header always set Referrer-Policy strict-origin + Header always set X-Frame-Options sameorigin ScriptAlias /cgi-bin/ /srv/web/ipfire/cgi-bin/captive/ Alias /assets/ /srv/web/ipfire/html/captive/assets/