Skip to content

Fix: Fixed issue with resolving paths containing ".." #11575

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

Conversation

ferrariofilippo
Copy link
Contributor

@ferrariofilippo ferrariofilippo commented Mar 6, 2023

Resolved / Related Issues
Items resolved / related issues by this PR.

Details

  • First commit is the actual fix, others are a refactoring
  • I removed .Contains() from GetPathWithoutEnvironmentVariable() since they are not really needed: .Replace() won't do anything if the string isn't matched
  • I can't test if this still works for ftp

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

@ferrariofilippo ferrariofilippo changed the title Fix: Files doesn't resolve path containing ".:" Fix: Files doesn't resolve path containing ".." Mar 6, 2023
@ferrariofilippo ferrariofilippo marked this pull request as draft March 6, 2023 12:39
@ferrariofilippo ferrariofilippo marked this pull request as ready for review March 6, 2023 17:49
@yaira2 yaira2 changed the title Fix: Files doesn't resolve path containing ".." Fix: Fixed issue with resolving paths containing ".." Mar 6, 2023
Copy link
Contributor

@QuaintMako QuaintMako left a comment

Choose a reason for hiding this comment

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

Code looks OK, I will need to test it out properly. It looks promising!

QuaintMako
QuaintMako previously approved these changes Mar 6, 2023
Copy link
Contributor

@QuaintMako QuaintMako left a comment

Choose a reason for hiding this comment

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

LGTM. But I cannot test FTP as well.

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Mar 16, 2023
@ferrariofilippo
Copy link
Contributor Author

I found a better way to achieve the same thing, I'll open a different PR

@ferrariofilippo ferrariofilippo deleted the Resolve_Path_Containing_Double_Dot branch March 20, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Files doesn't fully resolve path containing ".."
3 participants