From cda11c958efabcde4303bd5fb2d9a2109d7ed60e Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 19 Jan 2017 21:44:22 -0500 Subject: [PATCH] pythonPackages.pysaml2: patch against external XML entities (CVE-2016-10127) --- pkgs/top-level/python-packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ebab286c9001..ef520db327b1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19540,9 +19540,18 @@ in { sha256 = "0y2iw1dddcvi13xjh3l52z1mvnrbc41ik9k4nn7lwj8x5kimnk9n"; }; + patches = [ + (pkgs.fetchpatch { + name = "CVE-2016-10127.patch"; + url = "https://sources.debian.net/data/main/p/python-pysaml2/3.0.0-5/debian/patches/fix-xxe-in-xml-parsing.patch"; + sha256 = "184lkwdayjqiahzsn4yp15parqpmphjsb1z7zwd636jvarxqgs2q"; + }) + ]; + propagatedBuildInputs = with self; [ repoze_who paste cryptography pycrypto pyopenssl ipaddress six cffi idna enum34 pytz setuptools zope_interface dateutil requests2 pyasn1 webob decorator pycparser + defusedxml ]; buildInputs = with self; [ Mako pytest memcached pymongo mongodict pkgs.xmlsec