<?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>22092</bug_id>
          
          <creation_ts>2013-05-20 03:02:01 +0000</creation_ts>
          <short_desc>&quot;append the result to url&apos;s password if url&apos;s pa...&quot;</short_desc>
          <delta_ts>2014-01-14 13:17:01 +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>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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="NARUSE, Yui">naruse</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87887</commentid>
    <comment_count>0</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 03:02:01 +0000</bug_when>
    <thetext>http://url.spec.whatwg.org/#parsing

If URL parser is run with input=&quot;http://foo:bar@exmple.com&quot;, base=&quot;about:blank&quot;  url=ParsedURL(input=http://aaa:bbb@example.org, base=&quot;about:blank&quot;), its username will be &quot;aaafoo&quot;, and its password will be &quot;bbbbar&quot;.

In authority state, following sentence should be inserted before &quot;Set the @ flag.&quot;:

  Otherwise, set url&apos;s username to the empty string, and set url&apos;s password to null.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87889</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-20 03:20:40 +0000</bug_when>
    <thetext>Wait, how would you get in that situation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87893</commentid>
    <comment_count>2</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 04:53:08 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Wait, how would you get in that situation?

Only unit testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87894</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-20 05:10:42 +0000</bug_when>
    <thetext>Okay, so I think the fix here would be to require an override state (which should probably be limited to those from the API) when you provide a parsed URL to the URL parser algorithm.

Unless you mean your failure is reachable through JavaScript somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87897</commentid>
    <comment_count>4</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 06:03:53 +0000</bug_when>
    <thetext>Sure, you can mark this as INVALID.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87904</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-20 07:42:04 +0000</bug_when>
    <thetext>Does this help:

https://github.com/whatwg/url/commit/0e6b08b5458860364d0f3604ca8f7c1b9244c600</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87908</commentid>
    <comment_count>6</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 07:52:58 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Does this help:
&gt; 
&gt; https://github.com/whatwg/url/commit/0e6b08b5458860364d0f3604ca8f7c1b9244c600

Oh, I see.
Therefore the URL parser algorithm should have following at the first line:

  If url is given but state override is not given, parse error, terminate this algorithm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87948</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-21 03:33:31 +0000</bug_when>
    <thetext>Given that something like that is not valid, I&apos;m not sure that&apos;s needed. Those arguments are specifically added for the API. If you use them in ways the API did not envision, you&apos;re in trouble :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87964</commentid>
    <comment_count>8</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-21 08:17:58 +0000</bug_when>
    <thetext>Sure if it is such policy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98421</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-01-14 13:17:01 +0000</bug_when>
    <thetext>I think this is now sufficiently clear.

http://url.spec.whatwg.org/#concept-url-parser</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>