[BlackBerry] Add a check to filter out cookies that tries to set the domain to a...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 23:48:49 +0000 (23:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 23:48:49 +0000 (23:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=94722

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-08-23
Reviewed by Rob Buis.

Changing the topleveldomain method name for better readability.

Also renaming the TopLevelDomain.h in platform to DomainTools
because there exists other tests that should belong in the same file.

Only changing method names and include file names.

* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::parseOneCookie):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126504 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/blackberry/CookieParser.cpp

index cb22547..9164773 100644 (file)
@@ -1,3 +1,21 @@
+2012-08-23  Otto Derek Cheung  <otcheung@rim.com>
+
+
+        [BlackBerry] Add a check to filter out cookies that tries to set the domain to a top level domain 
+        https://bugs.webkit.org/show_bug.cgi?id=94722
+
+        Reviewed by Rob Buis.
+
+        Changing the topleveldomain method name for better readability.
+
+        Also renaming the TopLevelDomain.h in platform to DomainTools
+        because there exists other tests that should belong in the same file.
+
+        Only changing method names and include file names.
+
+        * platform/blackberry/CookieParser.cpp:
+        (WebCore::CookieParser::parseOneCookie):
+
 2012-08-23  Shezan Baig  <shezbaig.wk@gmail.com>
 
         Fix cross-direction stretch for replaced elements in column flexbox
index e29ea28..2564c56 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "Logging.h"
 #include "ParsedCookie.h"
-#include <network/TopLevelDomain.h>
+#include <network/DomainTools.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/text/CString.h>
 
@@ -274,7 +274,7 @@ ParsedCookie* CookieParser::parseOneCookie(const String& cookie, unsigned start,
 
                 // Check whether the domain is a top level domain, if it is throw it out
                 // http://publicsuffix.org/list/
-                if (!BlackBerry::Platform::TopLevelDomain::isCookieWritableDomain(realDomain.utf8().data()))
+                if (BlackBerry::Platform::isTopLevelDomain(realDomain.utf8().data()))
                     LOG_AND_DELETE("Invalid cookie %s (domain): it did not pass the top level domain check", cookie.ascii().data());
 
                 res->setDomain(realDomain);