Catalog: a www.github.com source is refused for its canonical form
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
99fcc774b4
commit
a6f9863d0d
2 files changed
+2
-1
No files matched your search
+1
-1
@@ -126,7 +126,7 @@ function manifest(dir, id) {
|
||||
if (new Set(app.platforms).size !== app.platforms.length) fail(where, "platforms repeat");
|
||||
address(where, app.website, "website");
|
||||
address(where, app.source, "source");
|
||||
if (app.source && new URL(app.source).hostname === "github.com" && !github(app.source)) fail(where, `a GitHub source is https://github.com/owner/repo: ${app.source}`);
|
||||
if (app.source && ["github.com", "www.github.com"].includes(new URL(app.source).hostname) && !github(app.source)) fail(where, `a GitHub source is https://github.com/owner/repo: ${app.source}`);
|
||||
if (app.website === null && app.source === null) fail(where, "website or source is required");
|
||||
if (!Array.isArray(app.previews) || !app.previews.length) fail(where, "previews must be a non-empty list");
|
||||
if (new Set(app.previews).size !== app.previews.length) fail(where, "previews repeat");
|
||||
|
||||
@@ -61,6 +61,7 @@ const bad = [
|
||||
["an encoded host", { app: { ...good, website: "https://good.example@evil.com/" } }, /plain host/],
|
||||
["a GitHub source with a trailing slash", { app: { ...good, source: "https://github.com/ada/tally/" } }, /github.com\/owner\/repo/],
|
||||
["a GitHub source with a query", { app: { ...good, source: "https://github.com/ada/tally?tab=readme-ov-file" } }, /github.com\/owner\/repo/],
|
||||
["a GitHub source on www", { app: { ...good, source: "https://www.github.com/ada/tally" } }, /github.com/owner/repo/],
|
||||
["a host with credentials", { app: { ...good, website: "https://good.example@evil.com/" } }, /plain host/],
|
||||
["a long description", { app: { ...good, description: "a".repeat(281) } }, /281 weighted characters/],
|
||||
["stars without their time", { app: { ...good, stars: 3 } }, /go together/],
|
||||
|
||||
Reference in new issue
Block a user