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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 8 18:59:31 PDT 2012


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





--- Comment #9 from Jason <jason.liu at torchmobile.com.cn>  2012-05-08 18:58:36 PST ---
(In reply to comment #8)
> Wow.  How did I read that so wrong?
> 
> Ok, so the new code has the opposite problem.  With the old code:
> 
> .xxxxx - REJECTED
> .xx.xx - accepted
> xxxxxx - accepted
> xxx.xx - accepted
> 
> With the new code:
> 
> .xxxxx - REJECTED
> .xx.xx - accepted
> xxxxxx - REJECTED
> xxx.xx - accepted
> 
> The old code only did the check when the domain started with a dot, but the new code always does it.

(In reply to comment #8)
> Wow.  How did I read that so wrong?
> 
> Ok, so the new code has the opposite problem.  With the old code:
> 
> .xxxxx - REJECTED
> .xx.xx - accepted
> xxxxxx - accepted
> xxx.xx - accepted
> 
> With the new code:
> 
> .xxxxx - REJECTED
> .xx.xx - accepted
> xxxxxx - REJECTED
> xxx.xx - accepted
> 
> The old code only did the check when the domain started with a dot, but the new code always does it.

CookieParser::parseOneCookie
{
...
case 'D':
case 'd' : {
...
// If the domain does not start with a dot, add one for security checks,     
// For example: ab.c.com dose not domain match b.c.com;
String realDomain = parsedValue[0] == '.' ? parsedValue : "." + parsedValue;
...
}

These codes will add '.' for xxxx.
So xxxx becomes .xxxx before checking in the old code. And then rejected.

The new code will check xxxx directly and drop it.

So there is no change in behaviour for xxxx.

-- 
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