Open js-truework opened 2 years ago
Was there every resolution to this? Did manually escaping the package name before using the API work?
To my knowledge. this has not been addressed and nothing I was able to do fixed it locally without an upstream fix.
Note: Since I'm dealing with a private organization with private repositories and private containers, I've changed everything to
myorg
,myrepo
, andmycontainer
, respectively.Summary
urllib.parse.quote
treats/
as a safe character./
in their name and must be referenced by the API with an escaped/
(i.e. %2F) (e.g./orgs/myorg/packages/container/myrepo%2Fmycontainer
is valid, but/orgs/myorg/packages/container/myrepo/mycontainer
is a 404)quote
can be reliably called without treating/
as a safe character, there may be other route options that need/
to be safe? (I don't think so since we're dealing with url structure and users supplying/
into any param is almost certainly not meant to be treated as a/
, which would/could change the url structure)myrepo%2Fmycontainer
) because the%
will get double encodedGithub Workflow
Unfortunately I do not have a public repository that I can share with you to reproduce this behavior. However, I can show you an example version of the github workflow that we use to build and subsequently tag and push the images which produces this behavior:
Reproduce with Curl
I am also able to produce the expected behavior and the bad behavior with curl:
Print_summary Examples
Same Script, urlencode the / myself
Other Variations I've tried
None of these work either, probably for pretty obvious reasons, but I wanted to show you the things I tried in as complete a detail as I can.
Expected behavior
I should be able to call the packages api with packages that have
/
in their identifier, since github allows it and I can curl it.Proposed Solutions
Option 1 - Blanket Change
Option 2 - Skip Quote Config
Option 3 - No Safe Quote Config