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

Allow any protocol in the download location URL verification #253

Open
goneall opened this issue Oct 15, 2024 · 3 comments
Open

Allow any protocol in the download location URL verification #253

goneall opened this issue Oct 15, 2024 · 3 comments

Comments

@goneall
Copy link
Member

goneall commented Oct 15, 2024

The current download pattern used is:

^(NONE|NOASSERTION|(((git|hg|svn|bzr)\+)?(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/|ssh:\/\/|git:\/\/|svn:\/\/|sftp:\/\/|ftp:\/\/|file:\/\/|file:\/)?[a-zA-Z0-9\.\-\ \_]+(:[0-9]{1,5})?(\/.*)?)|(git\+git@[a-zA-Z0-9\.\-]+:[a-zA-Z0-9/\\.@\-]+)|(bzr\+lp:[a-zA-Z0-9\.\-]+))$

There is an issue where the s3 protocol is not recognized (see spdx/spdx-gradle-plugin#139).

Perhaps we should allow any protocol - since s3 is not an IANA standard protocol.

@goneall
Copy link
Member Author

goneall commented Oct 16, 2024

From the tools implementers call on 16 Oct. 2024 - general agreement we should allow any protocol.

Additional suggestions from the call:

  • RFC 2396 has a regex for URI
  • XSD defines ANYURI
  • use Apache Validator

@goneall
Copy link
Member Author

goneall commented Oct 16, 2024

Here's the regex from RFC 2396: ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?

@goneall
Copy link
Member Author

goneall commented Oct 16, 2024

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

No branches or pull requests

1 participant