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

Sanitize filepaths #86

Merged
merged 3 commits into from
Dec 7, 2015
Merged

Sanitize filepaths #86

merged 3 commits into from
Dec 7, 2015

Conversation

kofalt
Copy link
Contributor

@kofalt kofalt commented Dec 7, 2015

After the refactor, it looks like the API will accept any path sent to it & try to write.
os.path.basename is safe to call multiple times & this seemed like the best entry points.

Thoughts?

@rentzso
Copy link
Contributor

rentzso commented Dec 7, 2015

LGTM

@josschne
Copy link
Contributor

josschne commented Dec 7, 2015

Can the filename have a trailing slash?

@kofalt
Copy link
Contributor Author

kofalt commented Dec 7, 2015

Dunno. @rentzso?

kofalt added a commit that referenced this pull request Dec 7, 2015
@kofalt kofalt merged commit 453a9c4 into master Dec 7, 2015
@kofalt kofalt deleted the fix-vuln branch December 7, 2015 22:42
@kofalt
Copy link
Contributor Author

kofalt commented Dec 7, 2015

Merged for now; open to further changes regarding trailing slashes

@rentzso
Copy link
Contributor

rentzso commented Dec 7, 2015

there shouldn't be any trailing slashes

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