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

Fixed security issue in upload system. #52

Closed
wants to merge 2 commits into from

Conversation

mu-arch
Copy link

@mu-arch mu-arch commented Feb 23, 2021

Allowing users to have the text "../" inside a filename allows them to escape the folder scope and essentially navigate anywhere they please if they can guess the filesystem's structure.

Allowing users to have the text "../" inside a filename allows them to escape the folder scope and essentially navigate anywhere they please if they can guess the filesystems structure.
status::Forbidden,
format!("Using filename to elevate folder scope is forbidden."),
));
}
Copy link
Owner

@TheWaWaR TheWaWaR Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar enough with the codebase or these libraries to find a clean way to do what you want. I will close this PR.

… file outside of the fileserver's root scope. Previously one could abuse the ability to create a custom filename like: "../file.txt" to place files in any path they could guess.
@mu-arch
Copy link
Author

mu-arch commented Feb 26, 2021

Cancel what I said earlier, it was simpler than I thought. Take a close look at what I did because I'm not 100% that I did it correctly.
credit to galo for finding the exploit

@TheWaWaR TheWaWaR closed this Jan 27, 2022
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.

2 participants