-
Notifications
You must be signed in to change notification settings - Fork 681
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
descriptor: Require lowercase hex #292
Conversation
c4ed400
to
efb13e3
Compare
Now that 75a51ed (fix regular expression of algorithim, 2016-08-30, opencontainers#221) has made the Markdown and JSON Schema consistent (and required lowercase algorithms), make digest comparisons easier by also requiring lowercase hex. This also: * Makes it easier to serve blobs out of a case-insensitive filesystem store. * Avoids having two otherwise-identical descriptor (or descriptor-containing) blobs with different hashes because they picked differend hex-casing. Signed-off-by: W. Trevor King <wking@tremily.us>
On Fri, Sep 09, 2016 at 03:40:09PM -0700, Antonio Murdaca wrote:
Yes. I've pushed efb13e3 → 660d130 adding a MUST to make that
This should be handled automatically via the JSON Schema regex (bumped |
@wking @stevvooe unfortunately with this PR, oci-image-tool isn't reporting any invalid digest format. if you change a digest under refs/ to have some uppercase char you get:
it isn't saying anything about lower/upper cases..I guess it's the same for blobs/ (notice that I would have had the above to fail with "invalid digest, no uppercase!" or something like this, I know I renamed to digest and now it can't find the correct blob) |
@runcom I don't think a fix for that should be a pre-cursor to a merge here. Sounds like our validation is slightly broken. Could we still merge this and file a bug? |
@stevvooe absolutely, this is by any means a blocker, sorry if I intended that, please go ahead and merge this, I'll file a separate issue and probably wait to do this because I would love to have the separate repo for the tool in order not to make noise in the spec. The fix in oci-image-tool will be done separately and it's part of a big refactor I have in mind about validation steps. |
Now that 75a51ed (fix regular expression of algorithim, 2016-08-30, #221) has made the Markdown and JSON Schema consistent (and required lowercase algorithms), make digest comparisons easier by also requiring lowercase hex.
This also:
store.
descriptor-containing) blobs with different hashes because they
picked differend hex-casing.