<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>175848</bug_id>
          
          <creation_ts>2017-08-22 13:46:48 -0700</creation_ts>
          <short_desc>[Curl] Update cookie jar implementation to filter out secure cookies</short_desc>
          <delta_ts>2018-03-12 11:08:55 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>157053</dependson>
    
    <dependson>175846</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Christopher Reid">chris.reid</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>don.olmstead</cc>
    
    <cc>fujii</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1341230</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2017-08-22 13:46:48 -0700</bug_when>
    <thetext>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 &apos;strSecure&apos; flag:
  (I) If &apos;strSecure&apos; matches TRUE:
    (i) If &apos;IncludeSecureCookies&apos; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1341236</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-08-22 13:49:41 -0700</bug_when>
    <thetext>*** Bug 175849 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>