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

Safely join storage paths #6910

Merged
merged 1 commit into from Apr 16, 2020
Merged

Safely join storage paths #6910

merged 1 commit into from Apr 16, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Apr 15, 2020

There is only one catch, the second argument can't start with /
(an exception is raised).
And it strips any starting slash from the first argument
(isn't a valid storage path).

Everything else works as expected, even storage.join('foo', '//bar//foo/') == 'foo/bar/foo/'.

And we are already using this function in other parts of the code.

There is only one catch, the second argument can't start with `/`
(an exception is raised).
And it strips any starting slash from the first argument
(isn't a valid storage path).

Everything else works as expected, even `storage.join('foo', '//bar//foo/') == 'foo/bar/foo/'`.
@stsewd stsewd requested a review from Apr 16, 2020
@stsewd stsewd merged commit 5e349bb into master Apr 16, 2020
2 checks passed
@stsewd stsewd deleted the safely-join-storage-paths branch Apr 16, 2020
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

2 participants