FTP emulation now needs scripts enabled

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

FTP emulation now needs scripts enabled

Post by Guest »

For a short time now FTP directory UI emulation only works on script-enabled domains and no longer on disabled ones like before.
Is this intentional, a bug or a problem on my side?
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
User avatar
therube
Ambassador
Posts: 7924
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: FTP emulation now needs scripts enabled

Post by therube »

What is FTP emulation?
What & where are you seeing whatever it is that you are (not?) seeing?
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:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.5
User avatar
therube
Ambassador
Posts: 7924
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: FTP emulation now needs scripts enabled

Post by therube »

So you're saying that on a "real" ftp:// site, ftp://ftp.adobe.com/pub/adobe/reader/wi ... 1.16/misc/, columns; Name, Size, Date, are not clickable unless scripts are allowed.

Confirmed.

And what, you're saying that FF no longer natively supports ftp:// protocol, instead uses a "shim" to emulate it?
And now, for that "shim" to work (in a fuller manner), you need to allow JavaScript, & with NoScript, by default, blocking JavaScript...
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:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.5
Guest

Re: FTP emulation now needs scripts enabled

Post by Guest »

therube wrote: Mon Jun 03, 2019 11:51 am So you're saying that on a "real" ftp:// site, ftp://ftp.adobe.com/pub/adobe/reader/wi ... 1.16/misc/, columns; Name, Size, Date, are not clickable unless scripts are allowed.
Yes, exactly. Did work with disabled scripts before, though.
Seems to be a regression:
v 10.1.9.8
=============================================================
x Fixed preset customization UI showing inherited DEFAULT
permissions if a protocol-level preset exists
x Simplified CSP HTTP header injection, avoiding report-to
until actually supported by browsers
x [L10n] Updated ru (thanks fatboy)
+ [Tor] Better UX for overriding protocol-level permissions
+ [Build] Option to force TLD updates
+ [L10n] Updated (es, ru) and new (el, he, ms, nb) locales
from OTF's Localization Lab Transifex project
+ [L10n] no_BO translation by comradekingu
+ FTP directory UI emulation on script-disabled domains
x Include ftp:// URLs in non-secure domain matching (thanks
Rassilon for RFE)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
skriptimaahinen
Master Bug Buster
Posts: 244
Joined: Wed Jan 10, 2018 7:37 am

Re: FTP emulation now needs scripts enabled

Post by skriptimaahinen »

Looks like Mozilla made some changes to the ftp pages that break the current workaround. Should be easy patch.
Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0
Guest

Re: FTP emulation now needs scripts enabled

Post by Guest »

Still present in 10.6.3.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: FTP emulation now needs scripts enabled

Post by barbaz »

This is the relevant error message in Browser Console -

Code: Select all

ReferenceError: UA is not defined ftp.js:1:5
The referenced line -

Code: Select all

if (UA.isMozilla) (() => {
For testing, I changed it to -

Code: Select all

if (true) (() => {
And this got it working.
*Always* check the changelogs BEFORE updating that important software!
-
skriptimaahinen
Master Bug Buster
Posts: 244
Joined: Wed Jan 10, 2018 7:37 am

Re: FTP emulation now needs scripts enabled

Post by skriptimaahinen »

You are right. That's the actual problem here. Missed that completely when I tested the updated script. Luckily there are few possible fixes for this. Sent patch suggestion to Giorgio, so hopefully fixed soon.
Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: FTP emulation now needs scripts enabled

Post by barbaz »

In 11.0.2rc1 the above error is intermittent, as if it's now a race condition. But FTP emulation still never works.

The following patch should fix the case when the race condition does *not* occur -

Code: Select all

diff --git a/src/lib/UA.js b/src/lib/UA.js
index d87efbb..db5df9d 100644
--- a/src/lib/UA.js
+++ b/src/lib/UA.js
@@ -1,6 +1,6 @@
 {
   let mozWebExtUrl = document.URL.startsWith("moz-");
-  let isMozilla = mozWebExtUrl || window.wrappedJSObject === "object";
+  let isMozilla = mozWebExtUrl || typeof window.wrappedJSObject === "object";
   if (isMozilla) {
     if (mozWebExtUrl) {
       // help browser-specific UI styling
skriptimaahinen, did you ever hear back about your patch for the race condition?
*Always* check the changelogs BEFORE updating that important software!
-
skriptimaahinen
Master Bug Buster
Posts: 244
Joined: Wed Jan 10, 2018 7:37 am

Re: FTP emulation now needs scripts enabled

Post by skriptimaahinen »

I did send a reminder to Giorgio about this after the latest rc came out.
Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Post Reply