>From 7406000b099aca3dfaa2cf152e2b4fa1581e60f6 Mon Sep 17 00:00:00 2001 From: kiasoc5 Date: Sun, 27 Mar 2022 15:27:59 -0400 Subject: [PATCH 2/2] gnu: Add python-flask-seasurf. * gnu/packages/python-web.scm (python-flask-seasurf): New variable. --- gnu/packages/python-web.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 38164d8243..3b70ea7843 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -6411,3 +6411,30 @@ (define-public python-flask-compress if it matches one of the compressible MIME types and whether the client and the server use some common compression algorithm, and will automatically attach the appropriate headers.") (license license:expat))) + +(define-public python-flask-seasurf + (package + (name "python-flask-seasurf") + (version "0.3.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "Flask-SeaSurf" version)) + (sha256 + (base32 + "04yfwln40iji7vn517mmkflnzxy7wa11yfhs124rch4s7pqhvygz")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "unittest"))))))) + (propagated-inputs (list python-flask)) + (home-page "https://github.com/maxcountryman/flask-seasurf") + (synopsis "Cross-site request forgery (CSRF) extension for Flask.") + (description + "SeaSurf is a Flask extension for preventing cross-site request forgery (CSRF). +CSRF attacks are problematic because the mechanism they use is relatively easy to exploit. This +extension attempts to aid you in securing your application from such attacks. This extension is +based on the Django middleware.") + (license license:bsd-3))) -- 2.35.1