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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27516</bug_id>
          
          <creation_ts>2014-12-04 15:28:42 +0000</creation_ts>
          <short_desc>exposing passwords is a bad idea</short_desc>
          <delta_ts>2015-06-15 16:29:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>URL</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sam Ruby">rubys</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>julian.reschke</cc>
    
    <cc>karl+w3c</cc>
    
    <cc>mike</cc>
    
    <cc>rubys</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115928</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-04 15:28:42 +0000</bug_when>
    <thetext>This bug is opened on behalf of David Walp, based on http://lists.w3.org/Archives/Public/public-webapps/2014OctDec/0505.html

Original comment:

Yes, we, Microsoft, are of the opinion that exposing passwords is a bad idea.  Based on received feedback, customers agree and I suspect our customers are not unique on this opinion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115933</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-04 15:41:25 +0000</bug_when>
    <thetext>This is how e.g. XMLHttpRequest implements the user/password arguments. Has Microsoft dropped support for these in ftp URLs too now or are they still not telling the whole story when giving feedback?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115935</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-04 15:45:38 +0000</bug_when>
    <thetext>A concrete example of an intentional difference from the proposed standard:

http://intertwingly.net/projects/pegurl/urltest-results/7357a04b5b

IE intentionally raises an exception of somebody attempts to fetch the href from an &lt;a&gt; element if that element contains a password.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115936</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-04 15:49:44 +0000</bug_when>
    <thetext>Nothing is fetched in that test right? You mean invoking href&apos;s getter? I don&apos;t think that should ever throw.

I don&apos;t really see what attack that would protect against.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115944</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-04 18:21:21 +0000</bug_when>
    <thetext>Ah, I should have avoided the word &apos;fetch&apos; as it has other meanings in this context. :-)

Yes, I meant invoking the getter for href on an anchor (&lt;a&gt;) element.

Do you have an alternative to throwing an exception to suggest that meets the stated customer requirements?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115945</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-04 18:33:38 +0000</bug_when>
    <thetext>Yeah, align with all the other UAs. I don&apos;t see the security problem. The password can also be retrieved through getAttribute().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115949</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-04 18:49:14 +0000</bug_when>
    <thetext>document.querySelector(&apos;a&apos;).getAttribute(&apos;href&apos;) does indeed expose the password with IE11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115951</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-04 19:26:12 +0000</bug_when>
    <thetext>Apologies to Microsoft for comment 1, that was out of line.

The last time this was discussed in the context of XMLHttpRequest it turned out that username/password was not disabled for all URL schemes. And it wasn&apos;t clear what they were protecting against. That is why the URL specification aligned with the majority of implementations.

There&apos;s definitely something to say for not handling URLs that username/password set in Fetch, at least for certain type of fetches, but that&apos;s a separate discussion (recently held on blink-dev).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116726</commentid>
    <comment_count>8</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2015-01-02 10:22:51 +0000</bug_when>
    <thetext>This syntax is deprecated per RFC 3986 and RFC 7230.  See:

http://www.ietf.org/mail-archive/web/apps-discuss/current/msg13571.html

At a minimum, URLs that contain a non-blank password should be considered a conformance error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116727</commentid>
    <comment_count>9</comment_count>
    <who name="Karl Dubost">karl+w3c</who>
    <bug_when>2015-01-02 11:38:39 +0000</bug_when>
    <thetext>Probably related, but maybe it deserved a proper bug at Moz.
https://bugzilla.mozilla.org/show_bug.cgi?id=479038</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119233</commentid>
    <comment_count>10</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2015-04-04 02:49:25 +0000</bug_when>
    <thetext>Related: https://support.microsoft.com/en-us/kb/834489</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121001</commentid>
    <comment_count>11</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-06-15 15:21:27 +0000</bug_when>
    <thetext>So yeah, if we want to match the RFCs we should make both username and password a conformance error. That seems very reasonable to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121003</commentid>
    <comment_count>12</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-06-15 16:29:51 +0000</bug_when>
    <thetext>https://github.com/whatwg/url/commit/e0c721b680d0977013ef2a14ba578388c01bd331</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>