<?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>167584</bug_id>
          
          <creation_ts>2017-01-30 05:27:40 -0800</creation_ts>
          <short_desc>Allow to use stored credentials also for downloads started by DownloadManager::startDownload</short_desc>
          <delta_ts>2017-02-14 05:10:17 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=167583</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1271228</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-01-30 05:27:40 -0800</bug_when>
    <thetext>I don&apos;t know why this is the default in other ports, but I don&apos;t think it&apos;s what we want in GTK+.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1271229</commentid>
    <comment_count>1</comment_count>
      <attachid>300100</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-01-30 05:39:24 -0800</bug_when>
    <thetext>Created attachment 300100
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1271234</commentid>
    <comment_count>2</comment_count>
      <attachid>300100</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-01-30 06:24:30 -0800</bug_when>
    <thetext>Comment on attachment 300100
Patch

r=me but please ask Alex Christensen before landing if you can do this cross-platform. Either this must be broken on Mac too, or he might have a different suggestion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1271577</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-01-30 22:04:42 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 300100 [details]
&gt; Patch
&gt; 
&gt; r=me but please ask Alex Christensen before landing if you can do this
&gt; cross-platform. Either this must be broken on Mac too, or he might have a
&gt; different suggestion.

Alex? :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272237</commentid>
    <comment_count>4</comment_count>
      <attachid>300100</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-02-01 12:49:43 -0800</bug_when>
    <thetext>Comment on attachment 300100
Patch

This should definitely have a test.  If we allow stored credentials in an ephemeral session, won&apos;t it just use the credentials in the CredentialStorage for that session?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272386</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-02-01 22:24:44 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Comment on attachment 300100 [details]
&gt; Patch
&gt; 
&gt; This should definitely have a test.  If we allow stored credentials in an
&gt; ephemeral session, won&apos;t it just use the credentials in the
&gt; CredentialStorage for that session?

But we don&apos;t allow it. The patch allows stored credentials only for the default session, the problem is that PendingDownload is created with the default parameter for allow stored credentials unconditionally, which is to no allow them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1273992</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-02-07 08:01:12 -0800</bug_when>
    <thetext>So this is good then...?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1276625</commentid>
    <comment_count>7</comment_count>
      <attachid>300100</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-02-13 23:55:29 -0800</bug_when>
    <thetext>Comment on attachment 300100
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=300100&amp;action=review

&gt; Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp:64
&gt; +#if PLATFORM(GTK)
&gt; +    // The GTK+ port wants to allow using stored credentials also for pending downloads.
&gt; +    parameters.allowStoredCredentials = sessionID.isEphemeral() ? DoNotAllowStoredCredentials : AllowStoredCredentials;
&gt; +#endif

Let&apos;s make this the case on all ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1276688</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-02-14 05:10:17 -0800</bug_when>
    <thetext>Committed r212291: &lt;http://trac.webkit.org/changeset/212291&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>300100</attachid>
            <date>2017-01-30 05:39:24 -0800</date>
            <delta_ts>2017-01-30 06:24:30 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-download-auth.diff</filename>
            <type>text/plain</type>
            <size>2179</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCBiYmM3MmI0MzU4Mi4uZTJiODFmMTg2YjggMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJLaXQyL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViS2l0M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mdsZXRvbigpLmZpbGVzSW5CbG9iKCpjb25u
ZWN0aW9uLCByZXF1ZXN0LnVybCgpKTsKKyNpZiBQTEFURk9STShHVEspCisgICAgLy8gVGhlIEdU
SysgcG9ydCB3YW50cyB0byBhbGxvdyB1c2luZyBzdG9yZWQgY3JlZGVudGlhbHMgYWxzbyBmb3Ig
cGVuZGluZyBkb3dubG9hZHMuCisgICAgcGFyYW1ldGVycy5hbGxvd1N0b3JlZENyZWRlbnRpYWxz
ID0gc2Vzc2lvbklELmlzRXBoZW1lcmFsKCkgPyBEb05vdEFsbG93U3RvcmVkQ3JlZGVudGlhbHMg
OiBBbGxvd1N0b3JlZENyZWRlbnRpYWxzOworI2VuZGlmCiAKICAgICBtX3BlbmRpbmdEb3dubG9h
ZHMuYWRkKGRvd25sb2FkSUQsIHN0ZDo6bWFrZV91bmlxdWU8UGVuZGluZ0Rvd25sb2FkPihXVEZN
b3ZlKHBhcmFtZXRlcnMpLCBkb3dubG9hZElELCAqbmV0d29ya1Nlc3Npb24sIHN1Z2dlc3RlZE5h
bWUpKTsKICNlbHNlCg==
</data>
<flag name="review"
          id="322007"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>