Skip to content

Commit dd1525f

Browse files
authored
Merge pull request #20 from brentonmallen1/master
Escape url slash regex
2 parents b4ed5ed + 88b21cd commit dd1525f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

opencontainers/distribution/reggie/defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
__version__
1515
)
1616
URL_REGEX = (
17-
"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
17+
"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
1818
)
1919
VALID_METHODS = ["HEAD", "GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS"]

opencontainers/tests/test_descriptor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
{
138138
"mediaType": "application/vnd.oci.image.config.v1+json",
139139
"size": 1470,
140-
"digest": "sha256.foo-bar:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b"
140+
"digest": "sha256.foo-bar:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b",
141141
# multihash example removed, not supported is invalid
142142
},
143143
]

opencontainers/tests/test_manifest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
141141
"size": 1470,
142142
"digest": "sha256.foo-bar:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b",
143-
}
143+
},
144144
# multihash is not registered, but still valid formatting, but here we would consider it invalid
145145
# {
146146
# "mediaType": "application/vnd.oci.image.config.v1+json",

0 commit comments

Comments
 (0)