futpib / policeman

Firefox extention for cross-site requests control (kind of RequestPolicy clone)
https://addons.mozilla.org/en-US/firefox/addon/policeman/
140 stars 11 forks source link

Help, Questions and General Discussion #18

Open futpib opened 9 years ago

futpib commented 9 years ago

If you have a question, need help, unsure if something is an issue, have something else to say, whatever else — post it here.

heforfree commented 9 years ago

some site need captcha, and need allow request to example: google.com i want just allow global rule to google just when it need captcha input Otherwise reject google.com request. is this possible? thanks

futpib commented 9 years ago

@heforfree As of 0.9, you can create a ruleset file like this (plain text file) and install it on preferences.xul#rulesets-manager page (enable it and click "save" button). There is no good documentation for the file format, but i think it's pretty self-explanatory. It allows any requests to hosts ending with "google.com" and paths starting with "/recaptcha/api".

heforfree commented 9 years ago

thankyou for your help. i installed 0.9 version but i try install that with install file.. button and i see installation failed this is what i see in ctrl+shift+j removed to keep clean post

futpib commented 9 years ago

@heforfree Fixed in 759ead82ced72c0860ddadd010b90641c8cec66b. Please check 0.10.

heforfree commented 9 years ago

thank you working now .simple test link https://safelinking.net/p/fe713d6c2d (click on show alternative) also i have rule like this: reject request for scripts from any domain to any domain it pervent this,is this normal?

futpib commented 9 years ago

It depends on ordering of rulesets on preferences.xul#rulesets-manager page. If you bring your "captchas ruleset" upper then "user rulesets", it will apply first.

heforfree commented 9 years ago

yes now working(need drag and drop).and must press submit to show captcha.

futpib commented 9 years ago

I just notices that site you mentioned does not use google recaptcha, so I don't really know what you mean.

heforfree commented 9 years ago

just somtime seems dont load all script.after some refresh show some blocked request from google and allowed captcha request. see attachment i mean when i click on reload or show alternative in tooltip i see javascript:; but if click submit then show image of captcha.finally work it seems main captcha is from solvemedia and altenative from google also this new options in front of domain is good

1

wisiwig commented 9 years ago

Hello! Thank you for the great addon! I wonder if you have seen this project: https://github.com/gorhill/httpswitchboard? I understand that this is maybe too much, but do you have any plans to add to the functionality of the Policeman blocking of ads? Thanks in advance.

futpib commented 9 years ago

@wisiwig You can already block ads with policeman. I thought about supporting easylist-format (or whatever it's called, I mean the rules format adblock uses) from the start, if that's what you ask about. I think there is no real benefit in supporting it, since we already have adblock who does it well, and policeman can coexist with adblock. Honestly, unless you have a good argument, I won't implement it anytime soon.

wisiwig commented 9 years ago

@futpib You're right, that's exactly what I was asking. Yes, I understand that the addon removes a huge amount of advertising that is loaded from third-party sites. And yes, I understand that the main purpose of your Policeman is not the removing the ads. I'll gladly use your addon without this function. Wish you success! Cheers!

Halibut80 commented 9 years ago

What rule is needed for youtube to play some video in html5 player (example: https://www.youtube.com/watch?v=W4Ovgd19Dfo) without allowing any request for www.youtube.com? RequestPolicy blocked requests to mediasource: (see: https://github.com/RequestPolicyContinued/requestpolicy/issues/447) this was the cause of malfunction html5 video. Policeman does not display these requests in popup and also does not allow create an allow rule for mediasource:... Bug?

(Sorry for Google Translate)

futpib commented 9 years ago

@Halibut80 Here is a minimal setup for youtube:

Halibut80 commented 9 years ago

futpib, I have all this rule, but html5 player starts only with: allow anything(or media) from www.youtube.com to any domain, and this is no good...

heforfree commented 9 years ago

@Halibut80 i can play fine.i can not play if i dont disable some options in noscript 2

futpib commented 9 years ago

@Halibut80 You can click on that "Media (1)" button and see where the request for video is going. I get it loaded from googlevideo scrot1 Also, I see nothing bad in allowing "media from youtube to anywhere".

Halibut80 commented 9 years ago

Well, i don't know... but for me (html5 dont work): html5 work (with rule "allow media www.yotube.com ->any domain"): Screenshot from www.youtube.com/html5:

heforfree commented 9 years ago

@Halibut80 .i dnot know why, but try create new profile and just install policeman and perform rule see work or not

Halibut80 commented 9 years ago

heforfree, you are right, the problem is somewhere in my options/addon. My apologies.

I was wrong, the problem is still there, on clean profile with only one Policeman. I forgot about by default flash enabled, and the player just runs with it, without prompting "click-to-play".

bastik-1001 commented 9 years ago

@futpib Is there a reason why the rule you mention in this thread is not included by default? Even if it would be disabled, what sounds sane to me, it would be easier for beginners.

ghost commented 9 years ago

Hello. Thank you for this wonderful addon. Are there any plans to have this addon work in Palemoon (which is a fork of Firefox)?

heforfree commented 9 years ago

hello can i now safely turn off noscript? also i dont know so much about xss i think if i dont allow script or cross-site request i am safe,right? but seems xss also work in html also? thanks

futpib commented 9 years ago

@AbrahamLinksys No, I have no such plans. Pale Moon FAQ says they will never adopt the Australis interface, which is more then a UI, but a nice API too. If they do not employ a kind of compatibility layer, they will loose compatibility with never add-ons, and I think they are aware of this. I am not against supporting older Firefoxes, like if someone would implement that and issue a pull request (one could adapt Adblock's CustomizableUI shim or something like that), I would happily merge that, but I won't put effort into this, sorry.

futpib commented 9 years ago

@heforfree It depends on your setup. By default only same-domain and same-second-level-domain stuff is loaded. I do not know much about how exactly NoScript works, but If it is nothing more then blocking scripts based on domain they come from, Policeman can do that too (and more, as you probably know).

futpib commented 9 years ago

@bastik-tor It's so specific, it won't make much difference for a beginner. Also, defaults are read-only, so user won't be able to add another captcha service or something like that (not to mention, there is no UI for that kind of thing). It would be awesome to have rulesets updatable (like greasemonkey's userscripts, stylish styles and alike) and maybe even have a repository for them. Then we (or anybody) could maintain a captchas ruleset that would actually be helpful. But the addon is still too amateur for that kind of things.

ghost commented 9 years ago

@bastik-tor; the captcha rule you mention means also Google being called whenever that captcha appears, even if not required. For instance on AOM when the captcha is only necessary when a new user registers. No point in allowing an external call systematically when it is needed only once.

ghost commented 9 years ago

@futpib I figured as much. I'll contact the developer and let you know if he replies.

futpib commented 9 years ago

@AbrahamLinksys I never implied that it's Pale Moon's fault. A lot of add-ons do support it (together with older FFs), but it takes some effort I am not willing to put.

bastik-1001 commented 9 years ago

@Zylinder It is a usability issue. For some it would be best if only the domain would be allowed, while the subdomains are rejected. For most the web would appear broken. I would not want to "ping" Google every time. Others would not mind. With the currently shipped rulesets, and custom rules one has to allow scripts from Google either every time they are needed or all the time (persistent rule, because it is more convenient). The captcha ruleset would enable users to allow only captchas from Google. From a privacy stand point it does not make a difference. I would not want the captcha ruleset to be enabled by default. I also understood that the ruleset is limited because it applies to Google's captcha only. I was not planning to start a discussion about it. (I'd hope that a website is so sane that it only loads stuff from external resources if it is required. E.g. upon clicking "Register". Well, that might not be the way it is.)

somini commented 9 years ago

This is a low priority thing, but I can't build the script. It hangs right on the coffeescript compilation with Error: In build/chrome/content/preferences-rulesets-manager.coffee, Parse error on line 325: Unexpected 'NUMBER'

futpib commented 9 years ago

@somini Builds fine here (CoffeeScript 1.8.0)

somini commented 9 years ago

$ apt show coffeescript #Version: 1.4.0-1 Damn Ubuntu!

liangxyz commented 9 years ago

I have a problem when I visit www.jd.com ,the images are not load and the toolabr button popup has nothing ![Uploading 无标题.png . . .]()

heforfree commented 9 years ago

@liangxyz allow image and script from .jd.com to 360buyimg.com. working for me.

ghost commented 9 years ago

@liangxyz, on Ploiceman's popup you'll have to click on 360buyimg.com on the left and then set an allow rule (temporary or persistent) to allow www.jd.com (or jd.com) to access 360buyimg.com ...

But, but, but ... do you trust 360buyimg.com?!

This is the whole point of Policeman :)

liangxyz commented 9 years ago

hello everybody ,thanks for your help.I know how to add a rule for a website ,but the problem is that Ploiceman's popup doesn't have anything with the 360buyimg.com,just like this snapshot : default

heforfree commented 9 years ago

@liangxyz i dont see such as request.so i dont know why.but change your ip see if it is help or not

image 1

ghost commented 9 years ago

@liangxyz ... either you have a tool which blocks 360buying.com (HOSTS file, whatever url/site blocker) either you are encountering what happens here sometimes to me as well, difficult to reproduce because I haven't yet understood the exact sequence which leads to this : Policeman popup, then another site opened, back to first site and popup doesn't show all external calls anymore ... in this case, closing pages, deleting history and calling page again has Policeman show all. This happens very seldom, my description is not good.

liangxyz commented 9 years ago

Thanks for your help !I find that when i suspend operating it worked fine

heforfree commented 9 years ago

or try this go to preferences and disable reject any request,this cause allow any request(remeber click save button) so see still same request is there or not.

liangxyz commented 9 years ago

Yes,it works

heforfree commented 9 years ago

so what request you see?

liangxyz commented 9 years ago

I can see 360buyimg.com

heforfree commented 9 years ago

its strange that why is wont show when reject any request is active. lets see futpib has any simillar problem or not but for now create allow rule for 360buyimg.com and then Disable allow any request in preferences to enable reject any request,then try again see work or not

liangxyz commented 9 years ago

ok,thanks

ghost commented 9 years ago

Suspend operation or Allow any request of course will allow all called sites to show since it disables any blocking. This is not a solution, or it is to know that a site not appearing wasn't absent because of a third-party tool. I suggest again if this occurs to close pages, delete cache+history, and reload page to see if problem persists.

liangxyz commented 9 years ago

well,thanks for your help!!!

siavash119 commented 9 years ago

Can we get "blocked elements handling" site filters? For example, by default I'd set it to "Replace with placeholder" then set it to "hide" once I know the site is functioning to my preference.

futpib commented 9 years ago

You mean add per-site "blocked elements handling" option?