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

Disallow dot-dot segments in the path argument of url_from_file_path #36

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

rmisev
Copy link
Owner

@rmisev rmisev commented Jan 10, 2024

To deal with dot-dot segments, it is recommended to use a special OS function to normalize the path before passing it to the upa::url_from_file_path function. Normalization can be done using the POSIX realpath function, the Windows GetFullPathName function, or, if you are using C++17, the std::filesystem::canonical function.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (347fc4c) 99.73% compared to head (18bfb3b) 99.74%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #36   +/-   ##
=======================================
  Coverage   99.73%   99.74%           
=======================================
  Files          16       16           
  Lines        2305     2326   +21     
=======================================
+ Hits         2299     2320   +21     
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rmisev rmisev merged commit 6440b77 into main Jan 10, 2024
22 checks passed
@rmisev rmisev deleted the file-path branch January 10, 2024 18:22
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

1 participant