<?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>40095</bug_id>
          
          <creation_ts>2010-06-02 18:30:05 -0700</creation_ts>
          <short_desc>webkit-patch apply-from-bug / apply-attachment should not ask for credentials if none are required</short_desc>
          <delta_ts>2015-07-06 12:07:15 -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>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="James Robinson">jamesr</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>bunhere</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>glenn</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>ossy</cc>
    
    <cc>sergio</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>233549</commentid>
    <comment_count>0</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-06-02 18:30:05 -0700</bug_when>
    <thetext>Currently when running webkit-patch apply-from-bug or apply-attachment I am always prompted for access to bugzilla credentials.  These are not needed to simply download a patch unless the bug is restricted and so the default should be to not prompt unless webkit-patch gets a 403 when trying to fetch the patch or attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019607</commentid>
    <comment_count>1</comment_count>
      <attachid>234158</attachid>
    <who name="youenn fablet">youennf</who>
    <bug_when>2014-07-01 05:12:55 -0700</bug_when>
    <thetext>Created attachment 234158
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019623</commentid>
    <comment_count>2</comment_count>
      <attachid>234158</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-07-01 07:52:25 -0700</bug_when>
    <thetext>Comment on attachment 234158
Patch

It was so annoying for me to, r=me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019628</commentid>
    <comment_count>3</comment_count>
      <attachid>234158</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-07-01 08:23:08 -0700</bug_when>
    <thetext>Comment on attachment 234158
Patch

Clearing flags on attachment: 234158

Committed r170639: &lt;http://trac.webkit.org/changeset/170639&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019629</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-07-01 08:23:11 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107121</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2015-07-06 09:59:12 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Comment on attachment 234158 [details]
&gt; Patch
&gt; 
&gt; Clearing flags on attachment: 234158
&gt; 
&gt; Committed r170639: &lt;http://trac.webkit.org/changeset/170639&gt;

This patch broke using webkit-patch apply-attachment to apply an attachment from a security bug:

dbates2-ruby:OpenSource dbates$ Tools/Scripts/webkit-patch apply-attachment --no-update 255825
Fetching: https://bugs.webkit.org/attachment.cgi?id=255825&amp;action=edit
Traceback (most recent call last):
  File &quot;Tools/Scripts/webkit-patch&quot;, line 84, in &lt;module&gt;
    main()
  File &quot;Tools/Scripts/webkit-patch&quot;, line 79, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File &quot;/Volumes/Data/WebKitDevGit/OpenSource/Tools/Scripts/webkitpy/tool/multicommandtool.py&quot;, line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File &quot;/Volumes/Data/WebKitDevGit/OpenSource/Tools/Scripts/webkitpy/tool/multicommandtool.py&quot;, line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File &quot;/Volumes/Data/WebKitDevGit/OpenSource/Tools/Scripts/webkitpy/tool/commands/download.py&quot;, line 173, in execute
    bugs_to_patches = self._collect_patches_by_bug(patches)
  File &quot;/Volumes/Data/WebKitDevGit/OpenSource/Tools/Scripts/webkitpy/tool/commands/download.py&quot;, line 165, in _collect_patches_by_bug
    bugs_to_patches[patch.bug_id()] = bugs_to_patches.get(patch.bug_id(), []) + [patch]
AttributeError: &apos;NoneType&apos; object has no attribute &apos;bug_id&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107122</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2015-07-06 10:05:58 -0700</bug_when>
    <thetext>The patch (attachment #234158) assumes that Bugzilla will return a web page with a non-HTTP 200 status code when authentication is required. Bugzilla always returns a page with an HTTP 200 status code regardless of whether authentication is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107125</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2015-07-06 10:06:14 -0700</bug_when>
    <thetext>Will rollout patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107126</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2015-07-06 10:11:18 -0700</bug_when>
    <thetext>Reverted r170639 for reason:

Broke using webkit-patch apply-attachment to apply an attachment from a security bug. The patch incorrectly assumed that Bugzilla returns a non-HTTP 200 status code in its HTTP response when authentication is required.

Committed r186356: &lt;http://trac.webkit.org/changeset/186356&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107138</commentid>
    <comment_count>9</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2015-07-06 10:46:43 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Reverted r170639 for reason:
&gt; 
&gt; Broke using webkit-patch apply-attachment to apply an attachment from a
&gt; security bug. The patch incorrectly assumed that Bugzilla returns a non-HTTP
&gt; 200 status code in its HTTP response when authentication is required.
&gt; 
&gt; Committed r186356: &lt;http://trac.webkit.org/changeset/186356&gt;

With the last bugzilla bump revision, credentials are actually needed for these requests. I guess this bug could be marked as WONTFIX.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107176</commentid>
    <comment_count>10</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-07-06 12:07:15 -0700</bug_when>
    <thetext>Unfortunately credentials are always needed with the new bugzilla,
so let&apos;s close it as wontfix.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>234158</attachid>
            <date>2014-07-01 05:12:55 -0700</date>
            <delta_ts>2014-07-01 08:23:07 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-40095-20140626200246.patch</filename>
            <type>text/plain</type>
            <size>2627</size>
            <attacher name="youenn fablet">youennf</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTcwNDE2CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggNTIyOWYwMWU0YzU5YjM0ODlkNmNhMWYyYzllMzM3MmMw
YTRiZDJkYi4uZjZkNTZiNTM0MTYxYjg2ZWI1YTczYTJjMGE2OGQ5NTQwYTBjNzk0NSAxMDA2NDQK
LS0tIGEvVG9vbHMvQ2hhbmdlTG9nCisrKyBiL1Rvb2xzL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE1
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ucmVhZCgpCiAKICAgICBkZWYgX3BhcnNlX2J1Z19pZF9mcm9tX2F0dGFjaG1lbnRf
cGFnZShzZWxmLCBwYWdlKToKICAgICAgICAgIyBUaGUgIlVwIiByZWxhdGlvbiBoYXBwZW5zIHRv
IHBvaW50IHRvIHRoZSBidWcuCkBAIC00OTgsMTEgKzUwMSwxMyBAQCBjbGFzcyBCdWd6aWxsYShv
YmplY3QpOgogICAgICAgICByZXR1cm4gaW50KG1hdGNoLmdyb3VwKCdidWdfaWQnKSkKIAogICAg
IGRlZiBidWdfaWRfZm9yX2F0dGFjaG1lbnRfaWQoc2VsZiwgYXR0YWNobWVudF9pZCk6Ci0gICAg
ICAgIHNlbGYuYXV0aGVudGljYXRlKCkKLQogICAgICAgICBhdHRhY2htZW50X3VybCA9IHNlbGYu
YXR0YWNobWVudF91cmxfZm9yX2lkKGF0dGFjaG1lbnRfaWQsICdlZGl0JykKICAgICAgICAgX2xv
Zy5pbmZvKCJGZXRjaGluZzogJXMiICUgYXR0YWNobWVudF91cmwpCi0gICAgICAgIHBhZ2UgPSBz
ZWxmLmJyb3dzZXIub3BlbihhdHRhY2htZW50X3VybCkKKyAgICAgICAgdHJ5OgorICAgICAgICAg
ICAgcGFnZSA9IHNlbGYuYnJvd3Nlci5vcGVuKGF0dGFjaG1lbnRfdXJsKQorICAgICAgICBleGNl
cHQ6CisgICAgICAgICAgICBzZWxmLmF1dGhlbnRpY2F0ZSgpCisgICAgICAgICAgICBwYWdlID0g
c2VsZi5icm93c2VyLm9wZW4oYXR0YWNobWVudF91cmwpCiAgICAgICAgIHJldHVybiBzZWxmLl9w
YXJzZV9idWdfaWRfZnJvbV9hdHRhY2htZW50X3BhZ2UocGFnZSkKIAogICAgICMgRklYTUU6IFRo
aXMgc2hvdWxkIGp1c3QgcmV0dXJuIEF0dGFjaG1lbnQoaWQpLCB3aGljaCBzaG91bGQgYmUgYWJs
ZSB0bwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>