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:
antisnatchor
2011-05-02 14:51:54 +00:00
parent 2374ecd7f1
commit f8f623a5e8

View File

@@ -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;