Bug 175848 - [Curl] Update cookie jar implementation to filter out secure cookies
Summary: [Curl] Update cookie jar implementation to filter out secure cookies
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Christopher Reid
URL:
Keywords:
: 175849 (view as bug list)
Depends on: 157053 175846
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-22 13:46 PDT by Brent Fulgham
Modified: 2018-03-12 11:08 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2017-08-22 13:46:48 PDT
The changeset r221017 filters helps ensure proper HTTPS behavior for mixed content by blocking secure cookie access for sites that accessed insecure content, and for blocking insecure content loads after a secure cookie is read.

The cURL backend currently has a stub that only serves to let it build. It does not provide the security benefit of the change.

The following updates are needed in CookieJarCurl:

1. cookiesForSession needs to be updated to:
(a) accept an IncludeSecureCookies flag.
(b) Return a std::pair containing the cookie string, and a boolean that indicates if secure cookies were read (didAccessSecureCookies, below).

2. addMatchingCurlCookie needs to be updated to:
(a) accept an IncludeSecureCookies flag.
(b) accept a boolean reference (e.g., didAccessSecureCookies) that can be set to true if the read process encountered a secure cookie.
(c) At Line 121, where you read the 'strSecure' flag:
  (I) If 'strSecure' matches TRUE:
    (i) If 'IncludeSecureCookies' flag is set to NO, return. didAccessSecureCookies should be set to false.
    (ii) Otherwise, set didAccessSecureCookies to true and continue.
  (II) Otherwise, continue.

I think that should do it.
Comment 1 Michael Catanzaro 2017-08-22 13:49:41 PDT
*** Bug 175849 has been marked as a duplicate of this bug. ***