Page 1 of 1

NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 18, 2021 12:30 am
by NSuser100
Hi,

There seem to be an issue or issues with the newer (later than 11.4) versions of NoScript, for some websites it doesn't work properly.

For example, go to https://author.today/work/genre/all?sor ... &length=60 and eanble NoScript for author.today domain. Note how the page is disabled/gray-outed in latest (later than 11.4) versions of NoScript even when Javascript is enabled for author.today domain. In NoScript 11.4 the page works properly, that is, it's not disabled/gray-outed.

Any ideas? Thanks


Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 18, 2021 1:13 am
by barbaz
That site seems to require webgl permission enabled.

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 18, 2021 1:41 am
by NSuser100
That site seems to require webgl permission enabled.
Yest, you're right, I enabled webgl and it worked for me. How did 11.4 handle the webgl? Was it enabled by default for all (temp)trusted websites? Thanks

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 18, 2021 3:00 pm
by therube
Were you meaning, 11.2.11rc4?

(I'll just note that I believe that after "hot" installing 11.2.11brc4, I couldn't get the page to display properly - even after setting 'Custom' with all options allowed.
It took an actual browser restart & with that, 'Custom' sufficed.)
Actually, that's wrong too.
Something weird is going on there?


Go to https://author.today/
Allow author.today
Set author.today to Custom

Oh, that's weird too.
The first number of times I went to Custom, ALL items were selected by default.
(Not knowing, I assumed that was expected.)
This last time, that is not the case?

If you set Custom, are those setting supposed to persist?
Oh, I guess they are.
So it is not Temp Allow + Custom, it is Temp Allow OR Custom.

(All right, I'll stop... heh.)


(Almost stop ;-).
Since we're here, I'll just point out this [PaleMoon] thread, Problems with author.today and www.ozon.ru.)

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Thu Aug 19, 2021 2:49 am
by Guest
Were you meaning, 11.2.11rc4?
I meant version 11.2.4 which I mistakenly called 11.4 above. Sorry for any confusion.

Apparently for any NS version later than 11.2.4 webgl must be enabled for author.today website to work properly. When using v11.2.4 I did not have webgl enabled and author.today was working fine (and still does with that version).

Regards,

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Thu Aug 19, 2021 2:03 pm
by barbaz
Guest wrote: Thu Aug 19, 2021 2:49 amApparently for any NS version later than 11.2.4 webgl must be enabled for author.today website to work properly. When using v11.2.4 I did not have webgl enabled and author.today was working fine (and still does with that version).
If you would like to find out why this is, could you please test what is the last rc version where webgl permission is not required?

Old NoScript @ https://noscript.net/feed?quantum&c=150&t=a

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Thu Aug 19, 2021 3:46 pm
by Guest
If you would like to find out why this is, could you please test what is the last working rc version?
The last rc where author.today works properly without webgl being enabled is http://secure.informaction.com/download ... 2.5rc6.xpi

Starting with http://secure.informaction.com/download ... 2.6rc1.xpi author.today requires webgl enabled to work properly.

Regards

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Fri Aug 20, 2021 10:52 pm
by Giorgio Maone
Thank you, please check latest development build:
v 11.2.12rc2
============================================================
x [nscl] Prevent unnecessary breakages on pages inspecting
canvas.getContext when webgl is disabled

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Sat Aug 21, 2021 6:53 am
by Guest
With the latest dev build ( https://secure.informaction.com/downloa ... .12rc2.xpi ) author.today worked fine for me with disabled webgl.

Regards,

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 25, 2021 7:10 pm
by skriptimaahinen
Unfortunately this fix makes things work only because it completely breaks webgl blocking in NS 11.2.12rc2!

Pointed out the original bug in viewtopic.php?f=10&t=26316#p103952, but lets recap:

Working version of modifyGetContext (Sorry, no git pull request yet.):

Code: Select all

  function modifyGetContext(scope, env) {
    let dispatchEvent = EventTarget.prototype.dispatchEvent;
    let { Event } = scope;
    for (let canvas of ["HTMLCanvasElement", "OffscreenCanvas"]) {
      if (!(canvas in scope)) continue;

      const getContext = scope[canvas].prototype.getContext;

      const handler = cloneInto({
        apply: function(targetObj, thisArg, argumentsList) {
          if (thisArg instanceof window[canvas] && /webgl/i.test(argumentsList[0])) {
            let target = canvas === "HTMLCanvasElement" && document.contains(thisArg) ? thisArg : scope;
            env.port.postMessage("webgl", target);
            return null;
          }
          return getContext.call(thisArg, ...argumentsList);
        }
      }, scope, {cloneFunctions: true});

      const proxy = new scope.Proxy(getContext, handler);
      scope[canvas].prototype.getContext = proxy;
    }
  }
Important points:

1. getContext needs to be from scope

2. instanceof check needs to be done against window[canvas]

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 25, 2021 9:23 pm
by Giorgio Maone
Fixed in latest development build, thanks.
v 11.2.12rc3
============================================================
x [nscl] Fix webgl blocking regression due to xray wrappers
confusion (thanks skriptimaahinen)

Re: NoScript later than 11.4 doesn't work properly for some websites

Posted: Wed Aug 25, 2021 11:00 pm
by skriptimaahinen
Looks good, passes tests and author.today seems to work. Thanks!

Though I would prefer not to ever have to dare patchWorkers...