From f8f623a5e8253718184cb52fc22c94095bc8123a Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Mon, 2 May 2011 14:51:54 +0000 Subject: [PATCH] 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 --- core/main/client/net.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/main/client/net.js b/core/main/client/net.js index 3aa9f9231..cff6a3736 100644 --- a/core/main/client/net.js +++ b/core/main/client/net.js @@ -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;