[Webkit-unassigned] [Bug 85028] [BlackBerry] Cookies should be checked during parsing to improve performance.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 30 07:52:15 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=85028





--- Comment #3 from Joe Mason <jmason at rim.com>  2012-04-30 07:52:15 PST ---
The approach looks good.

size_t dotPosition = parsedValue.find(".", 1);

That looks wrong, though. The original code skipped this check if the domain did not start with a dot.  So originally we had (where x is any character that isn't a dot):

.xxxxx - accepted
.xx.xx - accepted
xxxxxx - REJECTED
xxx.xx - accepted

This is the same as searching for the dot from position 0, not 1.

Also we have lost this check:

162  // ignore domain security if protocol doesn't have domains
163  if (shouldIgnoreDomain(cookie->protocol()))
164      return false;
165 
166  // Reject Cookie if domain is empty
167  if (!cookie->domain().length())
168      return true; 

We should check this in the parser, after the switch statement when both protocol and domain have been read.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list