Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript is still on with gold #272

Closed
232qwer opened this issue Jun 16, 2020 · 13 comments
Closed

Javascript is still on with gold #272

232qwer opened this issue Jun 16, 2020 · 13 comments
Assignees
Milestone

Comments

@232qwer
Copy link

232qwer commented Jun 16, 2020

Hello,
Thank you for the app. I left a tip. Some onion sites block me because it say javascript is still on even though I have it on the gold setting with no javascript selected.
Please help

@tladesignz tladesignz self-assigned this Jun 18, 2020
@tladesignz
Copy link
Contributor

@232qwer, thanks for your support!
Indeed JavaScript is still on. In fact, I don't think we can suppress it, actually, and we inject some of our own to enable the context menu.
It's just that we're denying all other JavaScript from getting loaded and executed by injecting a very restrictive Content-Security-Policy HTTP header.

Not sure if I can help you there, but if you provide an example, I can take a look and maybe find a solution.

@ghost
Copy link

ghost commented Aug 22, 2020

Hi, I also appreciate this app!
I’ve seen this be an issue from time to time, for instance when accessing a hidden site such as
http://flkzk2qjqe2yo5etsb7klxjihgrj7bi54k3iscccvkk7xbkif6x5etad.onion/
Hope that helps.

@tladesignz
Copy link
Contributor

So, the technique to detect JavaScript is simple: a display: none CSS attribute is hidden inside a <noscript> tag.

I can completely disable JavaScript with the Content-Security-Header by removing sandbox allow-scripts. Then this technique works as expected.

However, this also disables our context menu on long-taps.

Seems like a good enough quick fix to solve the problem at hand.
However, that will change the browser behaviour for other people.
To get both, unchanged UI and support for this problem, this needs some UI toggle, where it is explained properly.
That opens up that can of security level worms again.

@mtigas, what's your take on this?

@tladesignz tladesignz added this to the 3.0.0 milestone Nov 2, 2020
@wisheurs
Copy link

Hello, I can't find a solution to this problem could you help me?

@wisheurs
Copy link

wisheurs commented Dec 1, 2020

??

@tladesignz
Copy link
Contributor

Hello, I can't find a solution to this problem could you help me?

Sorry, this needs a UI redesign, which we currently don't have a budget for.

@webWHITEonion
Copy link

Hello, is this still relevant? because it is impossible to connect to some dark sites. also can't open a pop-up window? is this also related to a problem with Apple? see you soon

@webWHITEonion
Copy link

@tladesignz

@tladesignz
Copy link
Contributor

@webWHITEonion Did you read all the comments? Is anything still unclear? Or did you just want to make the point that this is relevant and you want it solved? If so, ok, I got it.

@webWHITEonion
Copy link

Hello thanks for the reply I think you need to fix this still problem. see you soon @tladesignz

@m4mb01t4l14n0
Copy link

@tladesignz: instead of rethinking security levels, how about just adding one called "Pro Platinum Ultra" that completely disables JavaScript as you suggest (with the only change over "Gold" this one item)?

To @webWHITEonion and @wisheurs and @232qwer our organization is no longer funded for this project, unfortunately. @tladesignz donates his time for the small amount of work he can do. We understand the significance of this issue, certainly.

tladesignz added a commit that referenced this issue Aug 2, 2021
Fixes #272: Added new content policy "Really Strict", which disables JavaScript completely
@tladesignz tladesignz modified the milestones: 3.0.0, 2.7.5 Aug 2, 2021
@tladesignz
Copy link
Contributor

Thanks a lot to @mikezs, who coded up a viable solution which actually is good enough to solve your problem and doesn't create the need for more default security levels!

@mikezs
Copy link
Contributor

mikezs commented Aug 2, 2021

@tladesignz You did all the hard work working out what the fix was, I just whipped up an implementation when I ran into this problem :) I haven't written Objective-C for many years, so was fun little task. Thanks for all your work on this, I'd be happy to implement more features in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants