Skip to content

fix(android): mask secure input in BareTextInputRenderer - #54

Merged
simonhamp merged 2 commits into
NativePHP:mainfrom
unlocdavid:fix/android-bare-text-secure-masking
Sep 19, 2026
Merged

simonhamp merged 2 commits into
NativePHP:mainfrom
unlocdavid:fix/android-bare-text-secure-masking

Conversation

@unlocdavid

Copy link
Copy Markdown
Contributor

On Android, secure has no effect on <native:bare-text-input> — the password renders in the clear.

BareTextInputRenderer builds its own BasicTextField and never passes visualTransformation, so the secure prop is parsed into TextInputProps (TextInputShared.kt:112) and mapped to PasswordVisualTransformation() (TextInputShared.kt:75-76), but never reaches the field.

Changes

  • Injected visualTransformation = props.visualTransformation into the BasicTextField constructor. No new import — the property is already typed on TextInputProps.

Notes

  • The outlined and filled renderers already pass it (OutlinedTextInputRenderer.kt:157, FilledTextInputRenderer.kt:144).
  • iOS is unaffected — its bare renderer delegates to NativeUITextInputCore.
  • Same class of omission as fix(android): apply keyboardOptions to BareTextInputRenderer #51 (props parsed, never wired), different argument. Placed next to singleLine to avoid conflicting with that PR.
  • keyboard="password" does not substitute: KeyboardType.Password is an IME hint, not a display transform.

unlocdavid and others added 2 commits August 18, 2026 14:36
The bare renderer builds its own BasicTextField and never passed
visualTransformation, so `secure` parsed but never reached the field
and the password rendered in the clear. Outlined and filled already
pass it; iOS is unaffected because its bare renderer delegates to
NativeUITextInputCore.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 22433a42-fb63-43d9-918b-6219140ee9fa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@simonhamp
simonhamp merged commit c2d78e0 into NativePHP:main Sep 19, 2026
1 check passed
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.

2 participants