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

[hackerone] webkitRelativePath may expose OS username #10666

Closed
diracdeltas opened this issue Aug 25, 2017 · 4 comments · Fixed by brave/muon#361
Closed

[hackerone] webkitRelativePath may expose OS username #10666

diracdeltas opened this issue Aug 25, 2017 · 4 comments · Fixed by brave/muon#361

Comments

@diracdeltas
Copy link
Member

diracdeltas commented Aug 25, 2017

https://hackerone.com/reports/258585

It appears that webkitRelativePath in Brave may expose the username, whereas in Chrome it doesn't. I'm not 100% sure it won't also expose the OS username in Chrome if the home folder itself is your default file picker location. However, it is weird that Brave shows the parent folder of the selected folder + selected folder, whereas Chrome shows selected folder + filename of first file. demo: https://dev.ruby.sh/brave/trap.html

STR:

  1. copy this to a local html file:
<h3 id="qmsg"></h3>
<input id="thing" type="file" webkitdirectory mozdirectory  />
<script>
    thing.onchange = function() {
       qmsg.innerHTML = thing.files[0].webkitRelativePath;
    }
</script>
  1. start a local webserver and open the file above
  2. click the 'choose files' button. select the same folder in both Chrome and Brave
  3. notice that the result is different in Chrome and Brave
@diracdeltas diracdeltas added this to the 0.22.x milestone Aug 25, 2017
@diracdeltas
Copy link
Member Author

@diracdeltas
Copy link
Member Author

This should be addressed by brave/muon#242 but we should check the PoC to make sure

@darkdh darkdh self-assigned this Oct 19, 2017
@darkdh darkdh added hackday Legacy label for a one-day hack-session. muon labels Oct 19, 2017
@bbondy bbondy modified the milestones: 0.22.x (Nightly Channel), Backlog Oct 25, 2017
@luixxiul luixxiul modified the milestones: Backlog, 0.22.x (Nightly Channel) Oct 26, 2017
@bbondy bbondy modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 25, 2018
@kjozwiak
Copy link
Member

kjozwiak commented Jun 20, 2018

Verified on macOS 10.13.4 x64 using the following build:

  • 0.23.11 6565c06
  • muon: 7.1.0
  • libchromiumcontent: 67.0.3396.87

Verified on Windows 10 x64 using

  • 0.23.11 - 6565c06
  • Muon - 7.1.0
  • libchromiumcontent - 67.0.3396.87

Verified on Ubuntu 17.10 x64

  • 0.23.12 - 88f6f07
  • Muon - 7.1.1
  • libchromiumcontent - 67.0.3396.87

@kjozwiak
Copy link
Member

@diracdeltas I managed to reproduce this with 0.18.34 so I can see the original issue. However, it seems like the issue has already been fixed under 0.22.810 8f30eeb which is the latest released version. I also tried with 0.23.11 6565c06 and get the following when uploading a folder:

  • Downloads/Brave-Beta-0.23.11.dmg (no username disclosure)

Will this particular fix cause any issue as the original bug already seems to be fixed under 0.22.810 8f30eeb?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.