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

Only raise security error on ../ #1453

Merged
merged 1 commit into from
Jun 30, 2019

Conversation

anoadragon453
Copy link
Contributor

@anoadragon453 anoadragon453 commented Jun 10, 2018

I've found that some files, such as http://127.0.0.1:43110/ZeroLSTN.bit/merged-ZeroLSTN2/1HLqL1eSZTRMpKLXjprjy7hFftuoAZEz1u/data/users/1GP11T6BYKsTz63srBNo43iTjZaX461o3i/artwork/Drunksouls_On_verra_plus_tard_....jpeg, raise a security error because ZeroNet thinks we're trying to escape from our sandboxed folder.

As far as I can tell, escape can only be had with ../ in a filepath, not just .., therefore I've changed this to be more specific in what it catches.

This allows these files to load successfully. As far as I can tell it does not open up any security vulnerabilities.

@purplesyringa
Copy link
Contributor

@HelloZeroNet Looks simple & promising. Can you merge this please?

@HelloZeroNet HelloZeroNet merged commit 9e7ae55 into HelloZeroNet:master Jun 30, 2019
@HelloZeroNet
Copy link
Owner

Yeah, looking good

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

Successfully merging this pull request may close these issues.

None yet

3 participants