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

Ask for help about NoScript, no registration needed to post
NSuser100

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

Post by NSuser100 » Wed Aug 18, 2021 12:30 am

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
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

barbaz
Master Bug Buster
Posts: 10013
Joined: Sat Aug 03, 2013 5:45 pm

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

Post by barbaz » Wed Aug 18, 2021 1:13 am

That site seems to require webgl permission enabled.
Temporarily off forum staff at my own request
*Always* check the changelogs BEFORE updating that important software!
-

NSuser100

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

Post by NSuser100 » Wed Aug 18, 2021 1:41 am

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
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

User avatar
therube
Ambassador
Posts: 7714
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

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

Post by therube » Wed Aug 18, 2021 3:00 pm

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.)
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; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.10

Guest

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

Post by Guest » Thu Aug 19, 2021 2:49 am

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,
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

barbaz
Master Bug Buster
Posts: 10013
Joined: Sat Aug 03, 2013 5:45 pm

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

Post by barbaz » Thu Aug 19, 2021 2:03 pm

Guest wrote:
Thu Aug 19, 2021 2:49 am
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).
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
Temporarily off forum staff at my own request
*Always* check the changelogs BEFORE updating that important software!
-

Guest

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

Post by Guest » Thu Aug 19, 2021 3:46 pm

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
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

User avatar
Giorgio Maone
Site Admin
Posts: 9143
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

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

Post by Giorgio Maone » Fri Aug 20, 2021 10:52 pm

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
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0

Guest

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

Post by Guest » Sat Aug 21, 2021 6:53 am

With the latest dev build ( https://secure.informaction.com/downloa ... .12rc2.xpi ) author.today worked fine for me with disabled webgl.

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

skriptimaahinen
Senior Member
Posts: 241
Joined: Wed Jan 10, 2018 7:37 am

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

Post by skriptimaahinen » Wed Aug 25, 2021 7:10 pm

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]
Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0

User avatar
Giorgio Maone
Site Admin
Posts: 9143
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

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

Post by Giorgio Maone » Wed Aug 25, 2021 9:23 pm

Fixed in latest development build, thanks.
v 11.2.12rc3
============================================================
x [nscl] Fix webgl blocking regression due to xray wrappers
confusion (thanks skriptimaahinen)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0

skriptimaahinen
Senior Member
Posts: 241
Joined: Wed Jan 10, 2018 7:37 am

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

Post by skriptimaahinen » Wed Aug 25, 2021 11:00 pm

Looks good, passes tests and author.today seems to work. Thanks!

Though I would prefer not to ever have to dare patchWorkers...
Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0

Post Reply