Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

giosh94mhz
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

Method Filesystem::doRemove is using renaming of parent directory before recursive removal, in order to implement atomic remove.

This is a good thing, but to implement this is generating a random path name, with a modified base64 which replaces base64's = sign with .. This may lead to directory named as path/..8U6/ which freaked out our synchronization tools and security log scanner.

Since the leading . is already (correctly) hard-coded, I see no issue in using _ as a safer alternative.

@alexislefebvre
Copy link
Contributor

This may lead to directory named as path/..8U6/ which freaked out our synchronization tools and security log scanner.

Are these tools right when they consider this path as risky? To my knowledge, there is no risk of accessing the parent directory here.

But this change looks good anyway, someone seeing a path like path/..8U6/ could be confused too.

@giosh94mhz
Copy link
Contributor Author

Are these tools right when they consider this path as risky? To my knowledge, there is no risk of accessing the parent directory here.
But this change looks good anyway, someone seeing a path like path/..8U6/ could be confused too.

Precisely as you say.

The tools aren't right, strictly speaking, but usually when I find /a/path/..like/this, I verify that there are no fishy patterns, like a GET /?request=..like/this.

@nicolas-grekas nicolas-grekas added this to the 5.4 milestone Apr 17, 2023
@nicolas-grekas
Copy link
Member

Thank you @giosh94mhz.

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.