Skip to content
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

downcase OCI identifiers and validate input of getRef() #293

Merged
merged 7 commits into from
Nov 28, 2022

Conversation

joshspicer
Copy link
Member

@joshspicer joshspicer commented Nov 21, 2022

Downcases the identifier input string (context: oras-project/oras#679)

Additionally, be more strict about what the Feature/Template OCI identifiers that we parse. getRef() now returned undefined if the parsed components don't match the regular expressions provided in the OCI distribution spec.

Adds new tests to assert this behavior.

NOTE: This isn't perfect yet, but an improvement. Left two TODOs inline.

relevant:

@joshspicer joshspicer marked this pull request as ready for review November 22, 2022 22:04
@joshspicer joshspicer requested a review from a team as a code owner November 22, 2022 22:04
@joshspicer joshspicer changed the title validate input of getRef() downcase OCI identifiers and validate input of getRef() Nov 23, 2022
Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants