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

Brave Shields not disabling under local html files #6243

Closed
jefetienne opened this issue Sep 30, 2019 · 3 comments
Closed

Brave Shields not disabling under local html files #6243

jefetienne opened this issue Sep 30, 2019 · 3 comments
Labels
feature/shields The overall Shields feature in Brave. needs-more-info The report requires more detail before we can decide what to do with this issue.

Comments

@jefetienne
Copy link

Description

After developing a web application offline using localStorage, I got an error from the console, disallowing my web app to read/write to localStorage, but then after going to Brave Settings and setting Cookie Control from "block 3rd party cookies" to "Allow all Cookies", my program started working.

I was unable to use the Brave Shields icon in the URL bar to allow all cookies because the icon was disabled, most likely because I was viewing an html file locally on my computer. I believe the disabled icon was supposed to mean that the shields were disabled, even though they actually were not.

Steps to Reproduce

  1. Open Brave Browser
  2. Go to brave://settings and set Brave Shields Defaults -> Cookie Control to "Block 3rd Party Cookies"
  3. Create an html file locally with this script using localStorage:
<!doctype HTML>
<html>
	<head>
		<title>Test</title>
		<script>
			if (typeof(Storage) !== "undefined") {
	  			localStorage.setItem("hello", "world");
	  		}
		</script>
	</head>
	<body>
	</body>
</html>
  1. Open that html file with Brave Browser

Actual result:

Open the console (ctrl-shift-C -> 'Console' tab) and observe the error:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

The 3rd party cookie blocking on brave shield defaults prevents a local html file from writing to localStorage, even though it appears that Brave Shields should be disabled according to the disabled Brave Shields icon to the far right of the URL bar.

Expected result:

Expected Brave Shields to be disabled and allow localStorage to be written.

Reproduces how often:

Every time.

Brave version (brave://version info)

Brave | 0.61.52 Chromium: 73.0.3683.86 (Official Build) (64-bit)
Revision | f9b0bec6063ea50ce2b71f5b9abbae7beee319a6-refs/branch-heads/3683@{#858}
OS | Linux

Version/Channel Information:

I only tested it on the official release.

@bsclifton
Copy link
Member

@jefetienne do you have a way to upgrade to a newer version? The version of Brave you're using is quite old... we're up to 0.68.142 at the moment

I suspect you may be using Ubuntu Snaps, which aren't officially supported (we haven't had an update in a while). Would be good to know if this is still an issue on current versions.

See our install instructions here:
https://brave-browser.readthedocs.io/en/latest/installing-brave.html

@bsclifton bsclifton added needs-more-info The report requires more detail before we can decide what to do with this issue. feature/shields The overall Shields feature in Brave. labels Oct 2, 2019
@bsclifton
Copy link
Member

I strongly believe we have fixed this - in particular, localhost with a port number. This behavior didn't work as expected before.

I'll go ahead and close the issue for now, but please re-open if you still encounter the issue after trying on the latest version. Thanks 😄

@jefetienne
Copy link
Author

Sorry about that, I retested it on the latest version with my windows machine and I still have the issue. I reopened it here:

#6278

@bbondy bbondy added this to the Closed / Invalid milestone Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/shields The overall Shields feature in Brave. needs-more-info The report requires more detail before we can decide what to do with this issue.
Projects
None yet
Development

No branches or pull requests

3 participants