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

Clarify that the keys in the run.files dictionary must be distinct when normalized #63

Closed
ghost opened this issue Oct 23, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 23, 2017

Section 3.2 says:

3.2. URI-valued properties
Certain properties in this specification specify the URI of a file. The value of every such property, if present, SHALL be a valid URI as described in RFC 3986.

So, for properties whose value is a URI, the spec says that the property value must conform to RFC 3986, which requires percent-encoding. (see RFC 3986 Appendix A).

But here’s what the spec says about the run.files dictionary:

3.12.9. files property
Each property name in the files object SHALL be the URI of a file examined by the tool.

They keys in the files dictionary aren’t properties, so 3.2 doesn’t strictly apply. On the other hand, the spec does say that those keys are URIs.

So I propose to make 3.12.9 explicit by changing it to: “Each property name in the files object SHALL be the URI (as described in RFC 3986) of a file examined by the tool.”

@ghost ghost self-assigned this Oct 23, 2017
@michaelcfanning
Copy link
Contributor

The files object can have relative URLs as a key and so there could be collisions. A physical location might have a relative URL with or without a base URL that differs. I don't think we describe how to populate colliding files object instances in this case. This sounds like a separate issue but it relates here because one way to resolve the collision is for the files dictionary keys not to be required to be URLs, they could be a constructed thing, for example, the uriBaseId + relative URL (the combination of which resolves a possible key collision).

@ghost
Copy link
Author

ghost commented Oct 24, 2017

I'll file a separate issue for this. Even if you allowed the key to be constructed from uriBaseId + relative URL, we would still want to require that the "relative URL" part be URL-encoded.

@ghost
Copy link
Author

ghost commented Jan 20, 2018

@michaelcfanning I filed #64, "run.files keys can collide if specified by relative URLs"

ghost pushed a commit that referenced this issue Jan 20, 2018
@ghost ghost changed the title Clarify that the keys in the run.files dictionary must be URL-encoded Clarify that the keys in the run.files dictionary must be distinct when normalized Jan 20, 2018
@ghost
Copy link
Author

ghost commented Jan 20, 2018

@michaelcfanning I changed the name of this issue to accord with the solution I'm actually proposing. What's important is not that the URL-valued key names be URL encoded. What's important is that, when normalized (See Section 3.2), they all be distinct.

ghost pushed a commit that referenced this issue Jan 20, 2018
@michaelcfanning michaelcfanning added the CSD.1 Will be fixed in CSD.1. label Feb 1, 2018
ghost pushed a commit that referenced this issue Mar 10, 2018
ghost pushed a commit that referenced this issue Mar 17, 2018
@ghost ghost added the resolved-fixed label Mar 17, 2018
@ghost ghost closed this as completed Mar 17, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant