Surging clouds
For example
File: // D:/soft/develop/env/sites/www.a.com/test.html
The code snippet is as follows:
......
Var xhr = new XMLHttp ();
Function postURLRet (url, data ){
If (xhr ){
Xhr. open ("POST", url, false );
Xhr. setRequestHeader (Content-Type, application/x-www-form-urlencoded );
Xhr. send (data );
Return xhr. responseText;
}
Return "";
}
</Script>
</Head>
<Body>
<Script>
Ret = postURLRet ("http://www.google.com ","");
Document. write (ret );
</Script>
</Body>
In IE 7, an insecure activex control is displayed by default, which requires confirmation.
After confirmation, you can cross-Origin
Firefox 3 does not have this problem
However
Things in the world often come from this.
The ietab extension of firefox does not have any security prompt and confirmation, and cross-origin is directly used.
I don't know if other third-party browsers with IE as the core will also have this problem.
In general, IE should not enable cross-origin for local files. Even if you need to confirm it, this is very inappropriate. It is equal to an additional path that can break the security model, although a card is set up, who knows which day it will not be bypassed.
If cross-origin of local files is combined with other vulnerabilities, such as downloading arbitrary files (with no execution and predictable paths), the power is huge.
The sum of the two vulnerabilities may turn into a very good bug.