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

validateIri to Reject "http://" URL #1158

Merged

Conversation

timmyteo
Copy link
Collaborator

Additional logic/tests to reject a URL of "http://"

Signed-off-by: Tim Messing <141575989+timmyteo@users.noreply.github.com>
@timmyteo
Copy link
Collaborator Author

This addresses the latest discussion on #1107

Signed-off-by: Tim Messing <141575989+timmyteo@users.noreply.github.com>
@@ -4102,6 +4102,7 @@ test.each([
["http://gitlab.com/behat-chrome/chrome-mink-driver.git", true],
["git+https://github.com/Alex-D/check-disk-space.git", true],
["UNKNOWN", false],
["http://", false],
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add more test cases like

empty string
http
https
https://
http://www
http://www.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

Signed-off-by: Tim Messing <141575989+timmyteo@users.noreply.github.com>
Copy link
Contributor

@prabhu prabhu left a comment

Choose a reason for hiding this comment

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

Thank you!

@prabhu prabhu merged commit 4905b81 into CycloneDX:master Jun 10, 2024
20 checks passed
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.

None yet

2 participants