<?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>13579</bug_id>
          
          <creation_ts>2007-05-03 17:12:42 -0700</creation_ts>
          <short_desc>window.location.assign(url) ignores &quot;javascript:&quot; type addresses</short_desc>
          <delta_ts>2007-05-03 17:44:20 -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>WebCore JavaScript</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</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>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Feng Qian">ian.eng.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fishd</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11295</commentid>
    <comment_count>0</comment_count>
    <who name="Feng Qian">ian.eng.webkit</who>
    <bug_when>2007-05-03 17:12:42 -0700</bug_when>
    <thetext>window.location = &quot;javascript:alert(&apos;hello world&apos;);&quot;; displays the alert window.
window.location.assign(&quot;javascript:alert(&apos;hello world&apos;)&quot;) does not.

It looks like a systematical pattern in kjs_window.cpp that ignores requested urls that start with &apos;javascript:&apos;.

Other browsers support window.location.assign(&apos;javascript:...&apos;);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11299</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-05-03 17:33:28 -0700</bug_when>
    <thetext>This works for me in the latest nightly build.

&lt;script type=&quot;text/javascript&quot;&gt;
    window.location.assign(&apos;javascript:alert(&quot;Hi&quot;)&apos;);
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11300</commentid>
    <comment_count>2</comment_count>
    <who name="Feng Qian">ian.eng.webkit</who>
    <bug_when>2007-05-03 17:35:53 -0700</bug_when>
    <thetext>After re-thinking, it might have its purpose. This can restrict some type of XSS attack.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11301</commentid>
    <comment_count>3</comment_count>
    <who name="Feng Qian">ian.eng.webkit</who>
    <bug_when>2007-05-03 17:44:20 -0700</bug_when>
    <thetext>Updated my tree, and it works fine.

(In reply to comment #1)
&gt; This works for me in the latest nightly build.
&gt; 
&gt; &lt;script type=&quot;text/javascript&quot;&gt;
&gt;     window.location.assign(&apos;javascript:alert(&quot;Hi&quot;)&apos;);
&gt; &lt;/script&gt;
&gt; 

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>