From c3435ee345bcf77da4bb1cf6035d0103e5655f63 Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Wed, 2 May 2012 14:25:31 +0300 Subject: [PATCH] Fixed a nasty bug in net.js forgeRequest. Stripping line breaks from request domain: prevented the requester/tunneling proxy to work (always cross-domain fails) --- core/main/client/net.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/main/client/net.js b/core/main/client/net.js index b5340d472..b4dd6f590 100644 --- a/core/main/client/net.js +++ b/core/main/client/net.js @@ -243,9 +243,9 @@ beef.net = { // check if same domain or cross domain var cross_domain = true; - if (document.domain == domain) { + 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"); + cross_domain = !(port == "80" || port == "443"); } else { if (document.location.port == port) cross_domain = false; }