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

URLToPath is not Windows-safe #407

Closed
cmurphy opened this issue Feb 11, 2025 · 0 comments · Fixed by #408
Closed

URLToPath is not Windows-safe #407

cmurphy opened this issue Feb 11, 2025 · 0 comments · Fixed by #408
Assignees
Labels
bug Something isn't working

Comments

@cmurphy
Copy link
Contributor

cmurphy commented Feb 11, 2025

Description

tuf.URLToPath trims the https:// prefix of a URL and replaces other /s with - to be POSIX-safe when the output is used as a directory name. This does not work on Windows if the URL starts with http:// or uses a nonstandard port, both of which can occur in tests.

See this test run on Windows as an example: https://github.com/cmurphy/sigstore-go/actions/runs/13270875530/job/37049712149

This affects the cosign unit tests as we try to implement sigstore/cosign#3548.

Version

5008d5c

@cmurphy cmurphy added the bug Something isn't working label Feb 11, 2025
@codysoyland codysoyland self-assigned this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants