-
Notifications
You must be signed in to change notification settings - Fork 56
Is the TUF target path separator always "/"? #63
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
Comments
Thanks for submitting this issue, @erickt. AFAIK |
This really shouldn't be mandatory. |
@trishankatdatadog Just to be safe, are you suggesting the targets role metadata should allow for both If we support |
My opinion is that the specification should be tolerant enough to accommodate both UNIX and Windows file separators. (You know never know what you're going to find out there.) It is up to the implementation to correctly handle file separators across platforms. WDYT? |
I think you're right, @trishankatdatadog, it may not be necessary to make this mandatory. But it's probably still a good idea for an implementation to normalize paths to unix style for the reason that @erickt has mentioned, and also to behave unsurprisingly when expanding unix shell-style wildcards as the we do in delegation path patterns (see spec#L877-L878). The metadata examples exclusively use forward-slashes. Is it worth adding a recommendation? |
@lukpueh Yes and yes, please |
I personally vote for us standardizing on the target path to be the URL spec's path relative url string, since presumably all OSs should have some mechanism for resolving a Otherwise, if we allow different path separators, then we run into ambiguity with a target path |
I noticed that in 4.4.5 spec defines as TARGETPATH:
Presumably this should be
/
, it says it's a file relative to the URL, and URLs use that as the path separator, but it'd be helpful if this was explicit.This is relevant because in rust-tuf, we have a PathTranslator in order to use alternative path separators to support converting
/
to\
on windows, but I'm pretty sure this logic really should be moved to our FileSystemRepository.The text was updated successfully, but these errors were encountered: