Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fixed warning about data: URIs in location bar #4899

Closed
privatzee opened this issue Oct 18, 2016 · 3 comments · Fixed by #7865
Closed

Fixed warning about data: URIs in location bar #4899

privatzee opened this issue Oct 18, 2016 · 3 comments · Fixed by #7865

Comments

@privatzee
Copy link
Contributor

privatzee commented Oct 18, 2016

Test plan

#7865 (comment)


Did you search for similar issues before submitting this one?
yes
Describe the issue you encountered:
@willy-b aptly demonstrated in #4798 how it can be handy to use something like:
data:text/html,<script>alert("no crash")</script> as a demonstration
But while most/all browsers allow that, NoScript forbids it.
Expected behavior:
for a security oriented browser, don't allow that.

  • Brave Version:
    0.12.4
  • Steps to reproduce:
    1. paste into URL bar:
      data:text/html,<script>alert("no crash")</script>
  • Screenshot if needed:
    brave data uris
  • Any related issues:
    E.g., a very long stand-alone phishing page can be contained in the URL bar and get rendered in the browser. You don't have to ever visit an actual malicious website. Also, using a URL shortening service can make it all seem innocent as it gets passed around in email.,

See: https://nakedsecurity.sophos.com/2012/08/31/phishing-without-a-webpage-researcher-reveals-how-a-link-itself-can-be-malicious/

@privatzee privatzee changed the title security: disable data: URIs in location bar [security] disable data: URIs in location bar Oct 18, 2016
@diracdeltas
Copy link
Member

as you mentioned, this is allowed in all major browsers, but i think it's a good suggestion for data: and javascript: scripts to be blocked when noscript mode is on in Brave. note that we also allow scripts in local files even when noscript is on.

@diracdeltas
Copy link
Member

setting a milestone because chrome now flags data as insecure

@diracdeltas diracdeltas changed the title [security] disable data: URIs in location bar [security] disable (or warn about) data: URIs in location bar Mar 17, 2017
@diracdeltas diracdeltas added this to the 0.14.1 milestone Mar 17, 2017
@diracdeltas diracdeltas self-assigned this Mar 17, 2017
@diracdeltas
Copy link
Member

note that, like Chrome, we disable 'javascript:' urls in the urlbar - it does a search instead using the default search engine.

diracdeltas added a commit that referenced this issue Mar 24, 2017
to prevent phishing attempts.
fix #4899

Test Plan:
1. automated tests should pass
2. enter data:text/html,<body>hi</body> in the urlbar
3. you should see a popup warning you about phishing
diracdeltas added a commit that referenced this issue Mar 24, 2017
to prevent phishing attempts.
fix #4899

Test Plan:
1. automated tests should pass
2. enter data:text/html,<body>hi</body> in the urlbar
3. you should see a popup warning you about phishing
@darkdh darkdh modified the milestones: 0.14.0, 0.14.1 Mar 26, 2017
darkdh pushed a commit that referenced this issue Mar 26, 2017
to prevent phishing attempts.
fix #4899

Test Plan:
1. automated tests should pass
2. enter data:text/html,<body>hi</body> in the urlbar
3. you should see a popup warning you about phishing
@alexwykoff alexwykoff changed the title [security] disable (or warn about) data: URIs in location bar Fixed warning about data: URIs in location bar Mar 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.