Cross-Domain XHR now totally blocked?

Bug reports and enhancement requests
Post Reply
WhyDoIHaveToRegister
Posts: 4
Joined: Fri Aug 13, 2010 12:09 am

Cross-Domain XHR now totally blocked?

Post by WhyDoIHaveToRegister »

On my blog I have a widget which uses XMLHTTPRequest to retrieve a status page from my server on another domain. To work with the security policy I added the Access-Control-Allow-Origin header to the response as the documentation specifies and it worked fine.

Today I've restarted Firefox for the first time in about a week and it seems at some point during that time, NoScript was updated. The new policy is now blocking my widget's requests even though they were allowed before, no settings have been changed, and all scripts on the page are whitelisted.

Specifically the onreadystatechange event fires as normal, but the status code is zero and the response is blank. A message appears in the error console:
[ABE] <LOCAL> Deny on {GET http://hyperhacker.no-ip.org:55555/ <<< http://segment6.blogspot.com/, http://segment6.blogspot.com/ - 11}
SYSTEM rule:
Site LOCAL
Accept from LOCAL
Deny
I haven't modified this rule myself so it seems some recent update changed it, causing it to now block all cross-domain requests even if the server allows them. This breaks useful functionality of the browser and most users will not know how or care to fix it, so to them it will look like my script (and any others using this method) is simply broken.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Cross-Domain XHR now totally blocked?

Post by therube »

What version of NoScript are you running?

If you revert to an earlier version, http://noscript.net/feed, does it work?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; rv:2.0b4pre) Gecko/20100811 SeaMonkey/2.1a3pre
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Cross-Domain XHR now totally blocked?

Post by Giorgio Maone »

If hyperhacker.no-ip.org resolves to a private IP, or to your WAN IP (i.e. the same IP you offer to web sites when you browse) that's normal.
In the latter case, you just need to uncheck NoScript Options|Advanced|WAN IP belongs to LOCAL.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3370
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Cross-Domain XHR now totally blocked?

Post by GµårÐïåñ »

So if I understand you correctly Giorgio, you are saying that if the machine he is accessing it from is also the machine hosting the website, then it will see it as a local resolution and the rule will attach? Now in the past when I did testing, I would use the actual server name (since it was NOT on my machine) to do the testing of code, because if I used the localhost or 127.0.0.1 address to test the local code, it would be blocked. This meant I never encountered this issue but since he is having it, does it mean that he is also hosting it and since the address resolves to the same location it sees it as local? Just wondering for better understanding.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/Gecko/Firefox
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Cross-Domain XHR now totally blocked?

Post by Giorgio Maone »

GµårÐïåñ wrote:So if I understand you correctly Giorgio, you are saying that if the machine he is accessing it from is also the machine hosting the website, then it will see it as a local resolution and the rule will attach?
Yes, provided that the origin is not in in the LAN as well.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
WhyDoIHaveToRegister
Posts: 4
Joined: Fri Aug 13, 2010 12:09 am

Re: Cross-Domain XHR now totally blocked?

Post by WhyDoIHaveToRegister »

I see, so other viewers wouldn't have this problem? Good to know, thanks. Is there a way to disable the "WAN IP belongs to local" rule for certain sites only, so I don't have to disable that protection entirely to test my widget?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Cross-Domain XHR now totally blocked?

Post by Giorgio Maone »

Insert the following rule in the beginning of your NoScript Options|Advanced|ABE SYSTEM rule:

Code: Select all

Site http://hyperhacker.no-ip.org:55555/*
Accept
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
WhyDoIHaveToRegister
Posts: 4
Joined: Fri Aug 13, 2010 12:09 am

Re: Cross-Domain XHR now totally blocked?

Post by WhyDoIHaveToRegister »

Thanks, that got it.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3370
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Cross-Domain XHR now totally blocked?

Post by GµårÐïåñ »

WhyDoIHaveToRegister wrote:I see, so other viewers wouldn't have this problem? Good to know, thanks. Is there a way to disable the "WAN IP belongs to local" rule for certain sites only, so I don't have to disable that protection entirely to test my widget?
WhyDoIHaveToRegister wrote:Thanks, that got it.
BTW, if your username is intentional and indicative, then you should know that this forum allows anonymous posting and registration is not required. So we are glad you have an account and you can have tracking, archiving and reminders for the added benefit but if you had chosen not to get it, you could have still posted just fine.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/Gecko/Firefox
WhyDoIHaveToRegister
Posts: 4
Joined: Fri Aug 13, 2010 12:09 am

Re: Cross-Domain XHR now totally blocked?

Post by WhyDoIHaveToRegister »

Mostly yes, but not in this particular forum.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
I use this name as a sort of "mini-protest" against sites that require registration when they really don't need to. I guess in this case it's just a configuration glitch?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Alan Baxter
Ambassador
Posts: 1586
Joined: Fri Mar 20, 2009 4:47 am
Location: Colorado, USA

Re: Cross-Domain XHR now totally blocked?

Post by Alan Baxter »

WhyDoIHaveToRegister wrote:I guess in this case it's just a configuration glitch?
Nah, not a glitch. Only the Support forums allow guest posting. Sometimes I forget that too.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3370
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Cross-Domain XHR now totally blocked?

Post by GµårÐïåñ »

I was under the impression, per Giorgio, that you can post in NoScript and FlashGot forums without registering and anonymously. I guess there are restrictions in place now that we didn't have or noticed before. I will verify.

EDIT: Confirmed that you can post anonymously in the NoScript Support, ABE and FlashGot Support forums of this site. So that is more than sufficient anonymous access for anyone to post their issues without registering, so the protest is fairly unfounded and unnecessary - especially that your issue could have been just as validly and properly more so, placed in the NoScript Support forum anonymously and didn't _HAVE_ to be in the Development forum if you didn't want to register. Hope that clears it up now.

Sample Anonymous Posts:
NoScript Support (http://forums.informaction.com/viewtopic.php?f=7&t=4876)
NoScripte/ABE (http://forums.informaction.com/viewtopi ... =23&t=4877)
FlashGot Support (http://forums.informaction.com/viewtopic.php?f=6&t=4878)
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/Gecko/Firefox
Post Reply