diff --git a/opencontainers/distribution/reggie/defaults.py b/opencontainers/distribution/reggie/defaults.py index 8b43fb9..d7aa151 100644 --- a/opencontainers/distribution/reggie/defaults.py +++ b/opencontainers/distribution/reggie/defaults.py @@ -14,6 +14,6 @@ __version__ ) URL_REGEX = ( - "http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+" + "http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+" ) VALID_METHODS = ["HEAD", "GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS"] diff --git a/opencontainers/tests/test_descriptor.py b/opencontainers/tests/test_descriptor.py index ebb0512..07b3a1b 100644 --- a/opencontainers/tests/test_descriptor.py +++ b/opencontainers/tests/test_descriptor.py @@ -137,7 +137,7 @@ { "mediaType": "application/vnd.oci.image.config.v1+json", "size": 1470, - "digest": "sha256.foo-bar:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b" + "digest": "sha256.foo-bar:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b", # multihash example removed, not supported is invalid }, ] diff --git a/opencontainers/tests/test_manifest.py b/opencontainers/tests/test_manifest.py index 6fc7b84..2aec60b 100644 --- a/opencontainers/tests/test_manifest.py +++ b/opencontainers/tests/test_manifest.py @@ -140,7 +140,7 @@ "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "size": 1470, "digest": "sha256.foo-bar:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b", - } + }, # multihash is not registered, but still valid formatting, but here we would consider it invalid # { # "mediaType": "application/vnd.oci.image.config.v1+json",