diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index e78d06eb7bac..ea7cca173a17 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , buildPythonPackage +, fetchpatch , fetchPypi , python , zope_interface @@ -25,6 +26,18 @@ buildPythonPackage rec { sha256 = "1wml02jxni8k15984pskks7d6yin81w4d2ac026cpyiqd0gjpwsp"; }; + patches = [ + (fetchpatch { + # https://github.com/twisted/twisted/security/advisories/GHSA-c2jg-hw38-jrqq + name = "CVE-2022-24801.patch"; + url = "https://github.com/twisted/twisted/commit/592217e951363d60e9cd99c5bbfd23d4615043ac.patch"; + hash = "sha256-psX5vAM9myuILuTazpebSk8QTT52CB6N7RXAY4MAV8g="; + excludes = [ + "src/twisted/web/newsfragments/10323.bugfix" + ]; + }) + ]; + propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools typing-extensions ]; passthru.extras.tls = [ pyopenssl service-identity idna ];