Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I agree that there is potential here for phishing. This was reported as a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=229050" rel="nofollow">bug in FireFox</a> quite a long time ago, but the problem is this:</p> <pre><code>&lt;body onmousedown="document.getElementById('changeMe').href='www.somewhereelse.com'"&gt; &lt;a id="changeMe" href="www.google.com"&gt;google&lt;/a&gt; &lt;/body&gt; </code></pre> <p>Events bubble up to their parent, you would need to detect if an onmousedown event was going to change the href of a child element. Sounds reasonable? Okay, how about this:</p> <pre><code>&lt;script&gt; function switcher() { window.location = "www.somewhereelse.com"; return false; } &lt;/script&gt; &lt;body onmousedown="switcher()"&gt; &lt;a href="www.google.com"&gt;google&lt;/a&gt; &lt;/body&gt; </code></pre> <p>So we need to look out for <code>window.location</code> in functions triggered by onmousedown events as well. Still sound reasonable? How about if I have the onmousedown event remove the link altogether, replace it with a new element and then trigger the click on that. I can keep coming up with examples.</p> <p>The point is, Javascript can be used to misdirect people using the status bar - you shouldn't trust it, you can only trust the URL.</p> <p>To change this browsers would need to give the set href value on a link at the time of the click presidency over any other events that might happen, basically disable mouse events on anchor tags. I would venture to guess they probably won't do this, it would break too many applications that already exist.</p> <p><strong>Edit:</strong> Alternatively, I've seen people propose different methods of detecting and warning the user about possible link hijacking, but I've not seen any implemented yet.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload