From 75a51ede70677a698f4e1aca3ff064a4056a776a Mon Sep 17 00:00:00 2001 From: Deng Guangxing <dengguangxing@huawei.com> Date: Tue, 30 Aug 2016 17:06:17 +0800 Subject: [PATCH] fix regular expression of algorithim change regular expression of algorithim in defs-image.json to: "pattern": "^[a-z0-9_+.-]+" and make descriptor.md consistent with it. Signed-off-by: Deng Guangxing <dengguangxing@huawei.com> --- descriptor.md | 2 +- schema/defs-image.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/descriptor.md b/descriptor.md index 4c00579f6..d1e76d2aa 100644 --- a/descriptor.md +++ b/descriptor.md @@ -60,7 +60,7 @@ The digest string matches the following grammar: ``` digest := algorithm ":" hex -algorithm := /[A-Fa-f0-9_+.-]+/ +algorithm := /[a-z0-9_+.-]+/ hex := /[A-Fa-f0-9]+/ ``` diff --git a/schema/defs-image.json b/schema/defs-image.json index 3c3e708f0..44553f55e 100644 --- a/schema/defs-image.json +++ b/schema/defs-image.json @@ -9,7 +9,7 @@ "digest": { "description": "the cryptographic checksum digest of the object, in the pattern '<hash>:<hexadecimal digest>'", "type": "string", - "pattern": "^[a-z0-9]+:[a-fA-F0-9]+$" + "pattern": "^[a-z0-9_+.-]+:[a-fA-F0-9]+$" }, "manifestDescriptor": { "id": "https://opencontainers.org/schema/image/manifestDescriptor",