rpms/kdelibs3/devel kdelibs-3.5.10-oCERT-2009-015-xmlhttprequest.patch, NONE, 1.1 kdelibs3.spec, 1.75, 1.76
Lukas Tinkl
ltinkl at fedoraproject.org
Mon Nov 2 14:55:25 UTC 2009
Author: ltinkl
Update of /cvs/extras/rpms/kdelibs3/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3933/devel
Modified Files:
kdelibs3.spec
Added Files:
kdelibs-3.5.10-oCERT-2009-015-xmlhttprequest.patch
Log Message:
fix unrestricted XMLHttpRequest access to local URLs (oCERT-2009-015)
kdelibs-3.5.10-oCERT-2009-015-xmlhttprequest.patch:
xmlhttprequest.cpp | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
--- NEW FILE kdelibs-3.5.10-oCERT-2009-015-xmlhttprequest.patch ---
Index: xmlhttprequest.cpp
===================================================================
--- khtml/ecma/xmlhttprequest.cpp (revision 954808)
+++ khtml/ecma/xmlhttprequest.cpp (working copy)
@@ -342,17 +342,17 @@
{
aborted = false;
+ const QString protocol = url.protocol().lower();
+ // Abandon the request when the protocol is other than "http",
+ // instead of blindly doing a KIO::get on other protocols like file:/.
+ if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
+ {
+ abort();
+ return;
+ }
+
if (method == "post") {
- QString protocol = url.protocol().lower();
- // Abondon the request when the protocol is other than "http",
- // instead of blindly changing it to a "get" request.
- if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
- {
- abort();
- return;
- }
-
// FIXME: determine post encoding correctly by looking in headers
// for charset.
QByteArray buf;
@@ -763,11 +763,11 @@
if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
DOM::Node docNode = static_cast<KJS::DOMDocument *>(obj.imp())->toNode();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(docNode.handle());
-
+
try {
body = doc->toString().string();
// FIXME: also need to set content type, including encoding!
-
+
} catch(DOM::DOMException& e) {
Object err = Error::create(exec, GeneralError, "Exception serializing document");
exec->setException(err);
Index: kdelibs3.spec
===================================================================
RCS file: /cvs/extras/rpms/kdelibs3/devel/kdelibs3.spec,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -p -r1.75 -r1.76
--- kdelibs3.spec 28 Sep 2009 22:47:21 -0000 1.75
+++ kdelibs3.spec 2 Nov 2009 14:55:24 -0000 1.76
@@ -27,7 +27,7 @@
Summary: K Desktop Environment 3 - Libraries
Version: 3.5.10
-Release: 19%{?dist}
+Release: 20%{?dist}
Name: kdelibs3
Obsoletes: kdelibs < 6:%{version}-%{release}
@@ -95,6 +95,8 @@ Patch203: kdelibs-3.5.4-CVE-2009-1690.pa
Patch204: kdelibs-3.5.10-cve-2009-1698.patch
# fix CVE-2009-2702 - ssl incorrect verification of SSL certificate with NUL in subjectAltName
Patch205: kdelibs-3.5.10-CVE-2009-2702.patch
+# fix oCERT-2009-015 - unrestricted XMLHttpRequest access to local URLs
+Patch206: kdelibs-3.5.10-oCERT-2009-015-xmlhttprequest.patch
Requires: hicolor-icon-theme
%if %{kde_settings}
@@ -246,6 +248,7 @@ format for easy browsing
%patch203 -p1 -b .cve-2009-1690
%patch204 -p1 -b .cve-2009-1698
%patch205 -p1 -b .cve-2009-2702
+%patch206 -p0 -b .oCERT-2009-015-xmlhttprequest
sed -i -e "s,^#define KDE_VERSION_STRING .*,#define KDE_VERSION_STRING \"%{version}-%{release} %{distname}\"," kdecore/kdeversion.h
@@ -569,6 +572,9 @@ touch --no-create %{_datadir}/icons/crys
%changelog
+* Mon Nov 2 2009 Lukáš Tinkl <ltinkl at redhat.com> - 3.5.10-20
+- fix unrestricted XMLHttpRequest access to local URLs (oCERT-2009-015), #532428
+
* Mon Sep 28 2009 Rex Dieter <rdieter at fedoraproject.org> - 3.5.10-19
- Conflicts with kde-settings (#526109)
More information about the scm-commits
mailing list