Skip to content

fix(android): reject invalid manifest XML before parsing - #2844

Draft
OskarEichler wants to merge 1 commit into
react-native-community:mainfrom
OskarEichler:codex/cli-strict-manifest-validation
Draft

fix(android): reject invalid manifest XML before parsing#2844
OskarEichler wants to merge 1 commit into
react-native-community:mainfrom
OskarEichler:codex/cli-strict-manifest-validation

Conversation

@OskarEichler

Copy link
Copy Markdown

Fix and blocking follow-up

XMLValidator.validate() returns either true or an error object. The current truthiness check accepts the error object, so malformed manifests are parsed as if validation succeeded. Require an actual true result.

Draft, not ready to merge or consume: the existing multi-activity fixture contains an unmatched </queries> closing tag. This fix correctly rejects it, leaving the unchanged focused upstream suite at 4 passed / 1 failed. The fixture needs correction in a separately authorized upstream change; no test file or assertion was changed here. This patch is excluded from our app's adoption candidate.

Compatibility

Malformed manifests now return null instead of occasionally yielding a launcher from partially parsed XML. Valid manifests retain existing behavior. No dependency or SDK version change.

Verification

  • Three isolated actual-source controls pass: valid launcher, malformed XML rejection, and missing launcher. The malformed case fails on the original implementation.
  • Focused existing getMainActivity suite: 4 pass, 1 fails for the fixture reason above. This is not reported as a passing suite.
  • Published tree equals the independently verified local tree, based on 9013a480c66aece0e23cc8082ee23f92274e3cf4.

Type: fix

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant