diff --git a/core/main/client/net.js b/core/main/client/net.js index c5ea60c2e..7266ae3bc 100644 --- a/core/main/client/net.js +++ b/core/main/client/net.js @@ -255,12 +255,13 @@ beef.net = { // check if same domain or cross domain var cross_domain = true; - if (document.domain == domain) { - if (document.location.port == "" || document.location.port == null) { - cross_domain = !(port == "80" || port == "443"); - } else { - if (document.location.port == port) cross_domain = false; - } + + if (document.domain == domain.replace(/(\r\n|\n|\r)/gm,"")) { //strip eventual line breaks + if(document.location.port == "" || document.location.port == null){ + cross_domain = !(port == "80" || port == "443"); + } else { + if (document.location.port == port) cross_domain = false; + } } // build the url