Skip to content

Always emit icon_url and author URL keys in extensions v1 - #271

Merged
admdly merged 1 commit into
mainfrom
fix/v1-always-emit-icon-and-author-url
Oct 7, 2026
Merged

admdly merged 1 commit into
mainfrom
fix/v1-always-emit-icon-and-author-url

Conversation

@admdly

@admdly admdly commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Legacy FOSSBilling installs (0.8.x) render the extension catalogue with Twig strict_variables, where accessing a missing key throws and crashes the whole Extensions page (FOSSBilling/FOSSBilling#4486). Template-side hardening only reaches installs that upgrade, so the v1 directory API must never omit these keys.

Root cause: parseExtensionRow emitted row.iconUrl ?? undefined and row.authorUrl ?? undefined. JSON.stringify drops undefined values, so entries without an icon or author URL shipped with the keys absent entirely.

Change: emit "" instead of undefined for both (covers /list and /:id, which share parseExtensionRow), and make icon_url/author.URL required in the v1 types to document the guarantee. Blank (rather than a placeholder image) lets old templates fall into their existing SVG fallback branch with no new network dependency.

Regression test asserts on the raw response body that both keys are present with "" values for a null-icon/null-URL entry (asserting on the string matters: it is the undefined-dropping serialization that caused this).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-07T02:21:57.520742Z 69eb2ae PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
api 69eb2ae Oct 07 2026, 02:19 AM

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Requires human review: Extensions v1 API now always emits icon_url and author URL keys as empty strings to fix legacy strict_variables crashes. This changes the public v1 response shape, so a human should sign off on the contract change.

Turn on auto-fix | Re-trigger cubic

@admdly admdly self-assigned this Oct 7, 2026
@admdly
admdly merged commit d92a642 into main Oct 7, 2026
9 checks passed
@admdly
admdly deleted the fix/v1-always-emit-icon-and-author-url branch October 7, 2026 02:24
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.

1 participant