Skip to content

Commit

Permalink
Merge pull request #20 from brentonmallen1/master
Browse files Browse the repository at this point in the history
Escape url slash regex
  • Loading branch information
vsoch committed May 9, 2024
2 parents b4ed5ed + 88b21cd commit dd1525f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion opencontainers/distribution/reggie/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion opencontainers/tests/test_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
]
Expand Down
2 changes: 1 addition & 1 deletion opencontainers/tests/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit dd1525f

Please sign in to comment.