Changeset 116601 in webkit
- Timestamp:
- May 9, 2012 8:30:48 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116598 r116601 1 2012-05-09 Jason Liu <jason.liu@torchmobile.com.cn> 2 3 [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead. 4 https://bugs.webkit.org/show_bug.cgi?id=85775 5 6 Reviewed by Rob Buis. 7 8 * http/tests/cookies/script-tests/single-quoted-value.js: Added. 9 * http/tests/cookies/single-quoted-value-expected.txt: Added. 10 * http/tests/cookies/single-quoted-value.html: Added. 11 1 12 2012-05-09 Hayato Ito <hayato@chromium.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r116596 r116601 1 2012-05-09 Jason Liu <jason.liu@torchmobile.com.cn> 2 3 [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead. 4 https://bugs.webkit.org/show_bug.cgi?id=85775 5 6 Reviewed by Rob Buis. 7 8 Make CookieParser::parseOneCookie handle (cookiename="cookievalue;expires=xxxx) correctly. 9 This cookie's value is "cookievalue not "cookievalue;expires=xxxx. 10 11 Test: http/tests/cookies/single-quoted-value.html 12 13 * platform/blackberry/CookieParser.cpp: 14 (WebCore::CookieParser::parseOneCookie): 15 1 16 2012-05-09 Raymond Liu <raymond.liu@intel.com> 2 17 -
trunk/Source/WebCore/platform/blackberry/CookieParser.cpp
r114608 r116601 110 110 unsigned pairEnd = start; // Pair end contains always the position of the ';' 111 111 112 // find the *first* ';' and the '=' (if they exist) 113 bool quoteFound = false; 112 // Find the first ';' which is not double-quoted and the '=' (if they exist). 114 113 bool foundEqual = false; 115 while (pairEnd < end && (cookie[pairEnd] != ';' || quoteFound)) { 116 if (tokenEnd == start && cookie[pairEnd] == '=') { 117 tokenEnd = pairEnd; 118 foundEqual = true; 119 } 120 if (cookie[pairEnd] == '"') 121 quoteFound = !quoteFound; 114 while (pairEnd < end && cookie[pairEnd] != ';') { 115 if (cookie[pairEnd] == '=') { 116 if (tokenEnd == start) { 117 tokenEnd = pairEnd; 118 foundEqual = true; 119 } 120 } else if (cookie[pairEnd] == '"') { 121 size_t secondQuotePosition = cookie.find('"', pairEnd + 1); 122 if (secondQuotePosition != notFound && secondQuotePosition <= end) { 123 pairEnd = secondQuotePosition + 1; 124 continue; 125 } 126 } 122 127 pairEnd++; 123 128 }
Note: See TracChangeset
for help on using the changeset viewer.