RequestPolicyContinued / requestpolicy

a web browser extension that gives you control over cross-site requests. Available for XUL/XPCOM-based browsers.
https://github.com/RequestPolicyContinued/requestpolicy/wiki
Other
252 stars 35 forks source link

reCaptcha label:"help wanted" #906

Open r4taw2mg opened 5 years ago

r4taw2mg commented 5 years ago

A most unnerving development in today's web is the ever growing usage of Google's reCaptcha. Can somebody please give me a hint of what request's to allow to make reCaptchas working. I use requestpolicy in connection with NoScript, allowing google.com and gstatic.com, but that is not enought.

Is this a possible entry for the FAQ?

Ryuno-Ki commented 5 years ago

Check whether you block the iFrame (had the same issue the other day with uMatrix on webpagetest.org).

myrdd commented 5 years ago

You can use this url for testing:
https://www.google.com/recaptcha/api2/demo

afaik you need to allow google.com and gstatic.com, both for requests and for JS.
it might be possible you even need to enable something like cookies or so.
Don't forget to check the ”other origins“ section in the left column of the RP menu.

myrdd commented 5 years ago

Is this a possible entry for the FAQ?

regarding docs/wiki/website IMHO we need to work on the current state of the wiki (and website) first before adding new content. let's simply use this issue for recaptcha question purposes by keeping it open.

h1z1 commented 5 years ago

Problem especially with Google properties is half the time they are doing something that causes their requests to not show up at all. There are some very popular and very broken js libs that appear to be trying the same thing too. One example is they test for cookies but fail to handle getting rejected. Assuming they aren't catching exceptions you may see them logged but most of the time not.

It's not obvious anyway.

myrdd commented 5 years ago

Problem especially with Google properties is half the time they are doing something that causes their requests to not show up at all.

Are you referring to the Network Monitor of Firefox?
https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor
Requests not showing up there are Web Sockets, afaik. Not sure if Google recaptcha is using WS.

Assuming they aren't catching exceptions you may see them logged but most of the time not.

I assume you're referring to the messages in the Web Console
https://developer.mozilla.org/en-US/docs/Tools/Web_Console
https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Console_messages

h1z1 commented 5 years ago

Happens in Chrome too but correct.. An example where this happens is microsoft's streaming platform mixer.com. You'll hit an ambivious error message like:

Something is very wrong... Please contact us with the following error: ReferenceError: rxjs is not defined

In this case there is at least an error logged on the console but it too would confuse most users:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    at https://mixer.com/_latest/assets/js/mixer-player.js?a=1:1:190111
    at https://mixer.com/_latest/assets/js/mixer-player.js?a=1:1:202762

It stems from

    var Jn = "mixer.video_settings";
    if (I) {
        var Yn = window.localStorage.getItem(Jn);
        if (Yn) {
            var zn = void 0;
            try {
                zn = JSON.parse(Yn)
            } catch (e) {
                zn = {}
            }
            var Xn = Date.now();
            (!zn.initTime || 864e5 < Xn - zn.initTime) && window.localStorage.setItem(Jn, JSON.stringify({
                initTime: Xn,
                autoplay: !0,
                muted: !1,
                volume: .6
            }))
        }
    }

Seems like a unique bug on their site but I've seen code in many places almost identical to that. The reason is of course cookies are blocked.