[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/ecma
From: Richard J. Moore <rich () kde ! org>
Date: 2008-08-24 23:22:13
Message-ID: 1219620133.667757.8337.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 851935 by rich:
- Be a little more strict about the acceptable values for header fields
in XMLHttpRequest. We're already protected by kio, but this way we get
better exceptions reported to the client code.
M +12 -1 xmlhttprequest.cpp
--- trunk/KDE/kdelibs/khtml/ecma/xmlhttprequest.cpp #851934:851935
@@ -249,8 +249,19 @@
return true;
}
-static bool isValidFieldValue(const QString& /*name*/)
+static bool isValidFieldValue(const QString& name)
{
+ const QChar* c = name.constData();
+ int l = name.length();
+ if (l == 0)
+ return true;
+
+ for (int i = 0; i < l; ++i, ++c) {
+ int u = c->unicode();
+ if ( u == '\n' || u == '\r' )
+ return false;
+ }
+
// ### what is invalid?
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic