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

Trademark disclaimer check breaks on url ending with forward slash #1419

Closed
thisisobate opened this issue Jan 30, 2024 · 2 comments
Closed

Comments

@thisisobate
Copy link
Contributor

I noticed that static sites with the correct link to the LF Trademark disclaimer break on Clomonitor. See ContainerSSH.

I did a little investigation and noticed that regex does not support a forward slash at the end of the url:
https://www.linuxfoundation.org/trademark-usage/.

Is this done by design?

@tegioz
Copy link
Contributor

tegioz commented Jan 30, 2024

Hi @thisisobate 👋

The regex should catch the case with the forward slash at the end, you can give it a try here:

trademark-disclaimer-regexp

The problem in the ContainerSSH case you mention is that the index document obtained when fetching their website has the following content (it does not include the trademark disclaimer):

% curl https://containerssh.io

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Redirecting</title>
  <noscript>
    <meta http-equiv="refresh" content="1; url=../v0.5/" />
  </noscript>
  <script>
    window.location.replace(
      "../v0.5/" + window.location.search + window.location.hash
    );
  </script>
</head>
<body>
  Redirecting to <a href="../v0.5/">../v0.5/</a>...
</body>
</html>

CLOMonitor at the moment only fetches the HTML document, it does not render the site. We've considered using a headless browser to improve this check as discussed in #1194, but it makes the repositories processing considerably slower and we're not sure if it's really worth it.

This is also related to my response in the Artifact Hub repository (artifacthub/hub#3620), where I mentioned that we had declared an exemption for CLOMonitor in Artifact Hub for this check for the same reason 🙂

@thisisobate
Copy link
Contributor Author

Oh yes, you're right! Just confirmed the regex covers forward slashes.
Thanks for the quick response! Will go ahead and close this issue.

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

2 participants