Allowing sites by IP does not work

Android-specific support, bug reports and feature requests.
Post Reply
Tallgeese
Posts: 1
Joined: Sun May 18, 2014 4:27 am

Allowing sites by IP does not work

Post by Tallgeese »

If you attempt to whitelist a website that is referred to by static IP, the setting will be saved in the preferences (as shown in about:config), however it will not be honored. It doesn't appear poorly formed, so I do not know what could be happening here.
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Allowing sites by IP does not work

Post by Thrawn »

To be clear, does it show up in the NoScript menu using the IP address? Or does it show up using the domain name, and you simply chose to whitelist it using the IP address?
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0
User avatar
therube
Ambassador
Posts: 7929
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Allowing sites by IP does not work

Post by therube »

What is the IP you have saved?
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 5.1; rv:29.0) Gecko/20100101 SeaMonkey/2.26
Lekensteyn
Junior Member
Posts: 31
Joined: Thu May 19, 2011 12:01 pm

Re: Allowing sites by IP does not work

Post by Lekensteyn »

You forgot to tell us that you had a custom port.

Patch: https://github.com/Lekensteyn/noscript- ... it/df86a85

Code: Select all

--- a/src/noscript-nsa/modules/Policy.jsm
+++ b/src/noscript-nsa/modules/Policy.jsm
@@ -170,7 +170,10 @@ Policy.prototype = {
     if (!site) return "";
     
     const map = this.map;
-    
+
+    // Ignore port numbers
+    site = site.replace(/:\d+$/, "");
+
     // exact match
     if (site in map) return site;
     
Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0
Post Reply