-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix ParsedURL
handling of %2F
in URL paths
#13838
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
2a48d74
to
c310b33
Compare
src/libfetchers/git-lfs-fetch.cc
Outdated
// FIXME %2F encode slashes? Does this command take/accept percent encoding? | ||
args.push_back(urlPathToCanonPath(url.path).abs()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kip93 as an LFS connoisseur, can you shed some light on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting question! I can't find any info on the server spec (neither here nor here) nor in the client docs either (here); and even digging through their tests I can't find anything, nor digging through reported issues. From what I see they are using go standard libraries though, so it's quite possible that this should support escape encoding.
I believe the best way to figure this out for sure is to test it. I can add a test to the git-lfs suite to figure out the behaviour and ensure we don't break anything in the future.
39d6ad6
to
7964c36
Compare
5d84cbf
to
cb477b5
Compare
: TarArchive{*source}; | ||
: TarArchive{*source}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, we should probably teach clang-format
not to do this some day :)
32d8035
to
988d4fe
Compare
988d4fe
to
4ad64a5
Compare
4ad64a5
to
f38a388
Compare
See the new extensive doxygen in `url.hh`. This fixes fetching gitlab: flakes. Paths are now stored as a std::vector of individual path segments, which can themselves contain path separators '/' (%2F). This is necessary to make the Gitlab's /projects/ API work. Co-authored-by: John Ericson <[email protected]> Co-authored-by: Sergei Zimmerman <[email protected]>
f38a388
to
c436b7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve Sergei's part!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Self-approve but this was reviewed and implemented together with @Ericson2314)
Motivation
See the new extensive doxygen in
url.hh
Context
New unit test of gitlab URL original from #13829.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.