From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qH8XJcO9FGTeCgAASxT56A (envelope-from ) for ; Fri, 17 Mar 2023 20:21:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eEo8JMO9FGRYBgEAG6o9tA (envelope-from ) for ; Fri, 17 Mar 2023 20:21:39 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5C1B2223E for ; Fri, 17 Mar 2023 20:21:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdFdT-0005bn-AI; Fri, 17 Mar 2023 15:21:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdFdQ-0005aa-MC for guix-patches@gnu.org; Fri, 17 Mar 2023 15:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pdFdQ-0004HX-EV for guix-patches@gnu.org; Fri, 17 Mar 2023 15:21:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdFdQ-00042q-9o for guix-patches@gnu.org; Fri, 17 Mar 2023 15:21:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60838] [PATCH v2 6/7] gnu: Add python-asgi-csrf. Resent-From: Felix Gruber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Mar 2023 19:21:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60838@debbugs.gnu.org Cc: Felix Gruber Received: via spool by 60838-submit@debbugs.gnu.org id=B60838.167908084415451 (code B ref 60838); Fri, 17 Mar 2023 19:21:04 +0000 Received: (at 60838) by debbugs.gnu.org; 17 Mar 2023 19:20:44 +0000 Received: from localhost ([127.0.0.1]:45689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdFd6-000413-48 for submit@debbugs.gnu.org; Fri, 17 Mar 2023 15:20:44 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdFd2-00040G-3b for 60838@debbugs.gnu.org; Fri, 17 Mar 2023 15:20:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 96200240085 for <60838@debbugs.gnu.org>; Fri, 17 Mar 2023 20:20:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679080834; bh=WQV8km1iKtQlYnnH3i9VLRAFXeBEOlk2YUCXZG6YvaY=; h=From:To:Cc:Subject:Date:From; b=JJNpnBTsC6khdo7IwZxfVfG6O/j3Gtx+nvoA8T4qKkcBW7Y1a76EQlRUWKXQRGQMb MMXjQTGM/jqk/iKHhccxxRRth6T6ofh9XuYFGpECW07TNv/1MsbprT6/Getd5BAudb mItjtXbguSaXkmZ2evw2epMTsqxeXGezWIEW6AO+mBSLH0wmRKcH2YYgPIgd6w6e0l 5159wkMZVmFwwc8r+QdWrYtBnoNiL4u8tMlY9w9NybkAYTaGDb0xj2dGCOm6MLxxB8 da/tpx1NnjV4krLNl9LFAMy0QguNmvfEEhEXZOyTuMPsHRrOq1Cz3ZTKWC9a7iVYub xD/R0l1Fc6jaw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PdYr21Qjwz6tm4; Fri, 17 Mar 2023 20:20:34 +0100 (CET) From: Felix Gruber Date: Fri, 17 Mar 2023 19:19:20 +0000 Message-Id: <1d28cdf8dfc8a8d9b9f593ef8efcdbe92c68f355.1679080713.git.felgru@posteo.net> In-Reply-To: References: <20230115214753.25034-1-felgru@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=JJNpnBTs; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679080899; a=rsa-sha256; cv=none; b=Z1dXATD/xO3KsMVPqODp/zsGXaIkEof3tXnF2uEA1nauj/eYHPFJF2h64hsAuQO72ohjwD sDuYjs88obLrVhsgFfRPVAYkfFRwcWQBdlKzk7C4Euj6pAIMxILX2UGTJKqp3QlQ2wJEuO /Ty0LxNHjzSjQIfo3MlW5PVs592b/8A/lCGnIlc3n5CXigkEAOhotWUlJE4zT2AhTZdVf2 vNYP7YS/lyhQLXh5QVe0mnbjbeMOmiDNx3vP2rcqJ8aaM36ZCzArufgXJSxWyM3RjCLiLP SNJBpJTe6WHR99GATwTorVScY00Jw2FxKgqFQnXnQeAxTP7N+qx9+KE4nxJxMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679080899; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6YC/BA1dBnggy+ByEJhrRnjNTmLtik+QF7WTeONloME=; b=fX74hmueFPkh8yoVYJiWGXh4PgeZt6+wx1D3ZYZ3gIH3OtSrlcyO2/8t0ux339eJNCS70s Hpqo9SzYCQXWN4ic9Y6eHQ4bTH/CVO7VYRTeyg93GRw5qz3qfnSFiXE2QXOkpu70TsKtz8 H+AosOROmtLNXYdY6VpP1Hg6tp99xOOtNPJTU00GCo2Js2OcJrINWDAVma4YzCg/QM2MRD +pl2d5tNWp3e+HUIvmwHUI/eSejH9JZSTXeAGClecOyMdNiGcRPCeVtEfqs2yvD3zLX2Zj XG+CY2sJ7Cxk8BbTqs6Tw64BrCmXSOa3html2jc6TV67kHUSGpml7L9Foj0d2w== X-Migadu-Spam-Score: -0.85 X-Spam-Score: -0.85 X-Migadu-Queue-Id: 5C1B2223E X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=JJNpnBTs; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) X-TUID: +pfRk/6OFaTt * gnu/packages/python-web.scm (python-asgi-csrf): New variable. --- gnu/packages/python-web.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 83e7d77da8..8c172d64c9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -570,6 +570,31 @@ (define-public python-asgiref WSGI. This package includes libraries for implementing ASGI servers.") (license license:bsd-3))) +(define-public python-asgi-csrf + (package + (name "python-asgi-csrf") + (version "0.9") + (source (origin + (method url-fetch) + (uri (pypi-uri "asgi-csrf" version)) + (sha256 + (base32 + "06klgxfxzjfkyjky3rkvmf2r07r7r2my53qq7g9qy6mcmvfkp7bf")))) + (build-system python-build-system) + (propagated-inputs (list python-itsdangerous python-multipart)) + (native-inputs (list python-asgi-lifespan + python-httpx + python-pytest + python-pytest-asyncio + python-pytest-cov + python-starlette)) + (home-page "https://github.com/simonw/asgi-csrf") + (synopsis "ASGI middleware for protecting against CSRF attacks") + (description "This middleware implements the Double Submit Cookie +pattern, where a cookie is set that is then compared to a csrftoken +hidden form field or a x-csrftoken HTTP header.") + (license license:asl2.0))) + (define-public python-asgi-lifespan (package (name "python-asgi-lifespan") -- 2.39.2