summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-12-10 19:38:50 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-12-10 19:38:50 +0100
commit15b9626a3df5c453941c78729e5f825147a594b0 (patch)
tree81280c832f53feb3517c116e87ce5b721d27378c /pkgs
parentc8a53923fca610ea56c98d58c891fd8161f6ac01 (diff)
downloadnixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.tar
nixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.tar.gz
nixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.tar.bz2
nixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.tar.lz
nixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.tar.xz
nixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.tar.zst
nixpkgs-15b9626a3df5c453941c78729e5f825147a594b0.zip
kde: fix CVE-2014-8600 by upstream patches
https://www.kde.org/info/security/advisory-20141113-1.txt
I couldn't find kio-extras, so I hope we don't have it disguised somewhere.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/kwebkitpart/CVE-2014-8600.diff33
-rw-r--r--pkgs/applications/networking/browsers/kwebkitpart/default.nix2
-rw-r--r--pkgs/desktops/kde-4.14/CVE-2014-8600.diff19
-rw-r--r--pkgs/desktops/kde-4.14/kde-runtime.nix2
4 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/kwebkitpart/CVE-2014-8600.diff b/pkgs/applications/networking/browsers/kwebkitpart/CVE-2014-8600.diff
new file mode 100644
index 00000000000..0c65e68f216
--- /dev/null
+++ b/pkgs/applications/networking/browsers/kwebkitpart/CVE-2014-8600.diff
@@ -0,0 +1,33 @@
+--- a/src/webpage.cpp
++++ b/src/webpage.cpp
+@@ -226,23 +226,26 @@
+     doc += QL1S( "<h3>" );
+     doc += i18n( "Details of the Request:" );
+     doc += QL1S( "</h3><ul><li>" );
+-    doc += i18n( "URL: %1", reqUrl.url() );
++    // escape URL twice: once for i18n, and once for HTML.
++    doc += i18n( "URL: %1", Qt::escape( Qt::escape( reqUrl.prettyUrl() ) ) );
+     doc += QL1S( "</li><li>" );
+ 
+     const QString protocol (reqUrl.protocol());
+     if ( !protocol.isNull() ) {
+-        doc += i18n( "Protocol: %1", protocol );
++        // escape protocol twice: once for i18n, and once for HTML.
++        doc += i18n( "Protocol: %1", Qt::escape( Qt::escape( protocol ) ) );
+         doc += QL1S( "</li><li>" );
+     }
+ 
+     doc += i18n( "Date and Time: %1",
+                  KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), KLocale::LongDate) );
+     doc += QL1S( "</li><li>" );
+-    doc += i18n( "Additional Information: %1" ,  text );
++    // escape text twice: once for i18n, and once for HTML.
++    doc += i18n( "Additional Information: %1", Qt::escape( Qt::escape( text ) ) );
+     doc += QL1S( "</li></ul><h3>" );
+     doc += i18n( "Description:" );
+     doc += QL1S( "</h3><p>" );
+-    doc += description;
++    doc += Qt::escape( description );
+     doc += QL1S( "</p>" );
+ 
+     if ( causes.count() ) {
diff --git a/pkgs/applications/networking/browsers/kwebkitpart/default.nix b/pkgs/applications/networking/browsers/kwebkitpart/default.nix
index 5ced048fe64..cb3a0e9eac4 100644
--- a/pkgs/applications/networking/browsers/kwebkitpart/default.nix
+++ b/pkgs/applications/networking/browsers/kwebkitpart/default.nix
@@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
     sha256 = "0kszffgg3zpf319lmzlmdba5gq8kdr5xwb69xwy4s2abc9nvwvbi";
   };
 
+  patches = [ ./CVE-2014-8600.diff ];
+
   buildInputs = [ kdelibs ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/desktops/kde-4.14/CVE-2014-8600.diff b/pkgs/desktops/kde-4.14/CVE-2014-8600.diff
new file mode 100644
index 00000000000..1fe26484605
--- /dev/null
+++ b/pkgs/desktops/kde-4.14/CVE-2014-8600.diff
@@ -0,0 +1,19 @@
+--- a/kioslave/bookmarks/kio_bookmarks.cpp
++++ b/kioslave/bookmarks/kio_bookmarks.cpp
+@@ -22,6 +22,7 @@
+ #include <stdlib.h>
+ 
+ #include <qregexp.h>
++#include <qtextdocument.h>
+ 
+ #include <kapplication.h>
+ #include <kcmdlineargs.h>
+@@ -197,7 +198,7 @@
+     echoImage(regexp.cap(1), regexp.cap(2), url.queryItem("size"));
+   } else {
+     echoHead();
+-    echo("<p class=\"message\">" + i18n("Wrong request: %1",path) + "</p>");
++    echo("<p class=\"message\">" + i18n("Bad request: %1", Qt::escape(Qt::escape(url.prettyUrl()))) + "</p>");
+   }
+   finished();
+ }
diff --git a/pkgs/desktops/kde-4.14/kde-runtime.nix b/pkgs/desktops/kde-4.14/kde-runtime.nix
index 1c9706f4f4b..2b8df4757de 100644
--- a/pkgs/desktops/kde-4.14/kde-runtime.nix
+++ b/pkgs/desktops/kde-4.14/kde-runtime.nix
@@ -4,6 +4,8 @@
 }:
 
 kde {
+  patches = [ ./CVE-2014-8600.diff ];
+
   buildInputs = [
     kdelibs attica xz bzip2 libssh libjpeg exiv2 ntrack
     qca2 samba libcanberra pulseaudio gpgme