Fixes crossdomain request detection in case BeEF is running on port 80 (document.location.port is then empty)
git-svn-id: https://beef.googlecode.com/svn/trunk@948 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -133,7 +133,7 @@ beef.net = {
|
||||
*/
|
||||
request: function(scheme, method, domain, port, path, anchor, data, timeout, dataType, callback) {
|
||||
//check if same domain or cross domain
|
||||
cross_domain = !((document.domain == domain) && (document.location.port == port));
|
||||
cross_domain = !((document.domain == domain) && ((document.location.port == port) || (document.location.port == "" && port == "80")));
|
||||
|
||||
//build the url
|
||||
var url = scheme+"://"+domain;
|
||||
|
||||
Reference in New Issue
Block a user