-
Notifications
You must be signed in to change notification settings - Fork 56
no trailing slash for post to /entries #1366
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
Signed-off-by: Ramon Petgrave <[email protected]>
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 think you're right here, thanks.
- I'd make the fix in
RekorLog.entries()
though: no need to rstrip() if we never add the slash in the first place. The other use cases where the url is used look like they will keep working just fine - Could also do the same fix of not adding the trailing slash in
RekorEntries.retrieve()
andRekorClient.log()
--- the situations look identical there (I don't think these end points get used in normal client use so they're not important but IMO makes sense to fix all the cases)
WDYT?
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.
Please add a line into CHANGELOG as well.
(I'm marking this "request changes" for the changelog: feel free to make your own decision on the suggestions in previous comment)
Hey @ramonpetgrave64, thanks for the PR!
Yeah, I think I'd prefer a "never add the slash" approach here versus "add it and then remove it sometimes" -- IMO that'll be easier to read and follow. (In terms of doing that -- I think we can just modifying the underlying |
|
Ah yeah, I forgot about the wonky join behavior even when there's no leading or trailing Given that, I think maybe we'd be better off uisng f-strings here and building up the URL that way, to avoid having to strip things post facto. Alternatively, we could use the rfc3986 package (which we probably already indirectly depend on), since it has |
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
@woodruffw rfc3986 isn't currently a dependency, so I changed to using f-strings. Also added the changelog entry. |
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
/gcbrun |
Signed-off-by: William Woodruff <[email protected]>
/gcbrun |
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.
Thanks @ramonpetgrave64!
@jku will need to re-review since I've tweaked the CHANGELOG, but this LGTM.
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.
Thanks
Client support for Rekor V2: sigstore-python
Summary
Resolves #1365
by stripping the any trailing slash from the POST request.
Release Note
Removed trailing "/" in POST requests to "/entries".
Documentation
None