Skip to content

fix(web): guard malformed source title fields - #860

Open
petomalik6-duda wants to merge 2 commits into
ProdigyV21:mainfrom
petomalik6-duda:fix/web-source-nonstring-fields
Open

petomalik6-duda wants to merge 2 commits into
ProdigyV21:mainfrom
petomalik6-duda:fix/web-source-nonstring-fields

Conversation

@petomalik6-duda

Copy link
Copy Markdown

Fixes #856.

Summary

ARVIO Web could crash the entire Details/Sources screen when a provider returned runtime values that did not match the TypeScript declaration, e.g. a non-string behaviorHints.filename or description.

The observed crash was:

TypeError: t.trim is not a function

This PR:

  • guards behaviorHints.filename before calling .trim()
  • ignores non-string description values instead of calling .split() on them
  • adds safe fallbacks for malformed source / addonName
  • adds regression tests covering number/object/array runtime payloads and preserving valid labels

The change is intentionally small and limited to source-title presentation hardening so one malformed source cannot take down the whole Sources screen.

@github-actions github-actions Bot added the area: web Changes to web or Netlify sites label Nov 2, 2026

@petomalik6-duda petomalik6-duda left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Patch is limited to runtime type guards in sourceTitle plus regression coverage for malformed provider payloads. The two GitHub Actions workflows currently show action_required because this PR originates from a fork; no jobs were started yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: web Changes to web or Netlify sites

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web Sources crash: non-string stream fields can trigger t.trim is not a function

1 participant