[Pkg-kde-commits] rev 547 - in trunk/packages/kdelibs/debian: . patches
Isaac Clerencia
isaac@costa.debian.org
Mon, 28 Feb 2005 10:27:45 +0100
Author: isaac
Date: 2005-02-28 10:27:44 +0100 (Mon, 28 Feb 2005)
New Revision: 547
Added:
trunk/packages/kdelibs/debian/patches/19_CAN-2005-0237_idn_khtml.diff
Modified:
trunk/packages/kdelibs/debian/changelog
Log:
Add patch to fix CAN-2005-0237, bugs 294271 and 294204
Modified: trunk/packages/kdelibs/debian/changelog
===================================================================
--- trunk/packages/kdelibs/debian/changelog 2005-02-28 09:13:16 UTC (rev 546)
+++ trunk/packages/kdelibs/debian/changelog 2005-02-28 09:27:44 UTC (rev 547)
@@ -3,6 +3,8 @@
+++ Changes by Isaac Clerencia:
* Fix syntax error in dcopidlng, closes: #297095
+ * Apply patch from KDE 3.4 to fix CAN-2005-0237 (spoofing using IDN),
+ closes: #294271, #294204
-- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Mon, 28 Feb 2005 09:32:27 +0100
Added: trunk/packages/kdelibs/debian/patches/19_CAN-2005-0237_idn_khtml.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/19_CAN-2005-0237_idn_khtml.diff 2005-02-28 09:13:16 UTC (rev 546)
+++ trunk/packages/kdelibs/debian/patches/19_CAN-2005-0237_idn_khtml.diff 2005-02-28 09:27:44 UTC (rev 547)
@@ -0,0 +1,29 @@
+--- kdelibs-orig/kdecore/network/kresolver.cpp 2005-02-28 10:10:20.830101112 +0100
++++ kdelibs/kdecore/network/kresolver.cpp 2005-02-28 10:13:18.632071104 +0100
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <netdb.h>
+ #include <time.h>
++#include <stdlib.h>
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
+
+@@ -868,6 +869,9 @@
+ // implement the ToAscii function, as described by IDN documents
+ QCString KResolver::domainToAscii(const QString& unicodeDomain)
+ {
++ if (getenv("KDE_USE_IDN") == 0L)
++ return unicodeDomain.latin1();
++
+ QCString retval;
+ // RFC 3490, section 4 describes the operation:
+ // 1) this is a query, so don't allow unassigned
+@@ -907,6 +911,8 @@
+ {
+ if (asciiDomain.isEmpty())
+ return asciiDomain;
++ if (getenv("KDE_USE_IDN") == 0L)
++ return asciiDomain;
+
+ QString retval;
+