flutter / flutter/flutter

[Android] Migrate remaining internal `Intent.get*Extra` calls to `IntentUtils`

Open
#192,076 0 comments 0 reactions 1 assignee Claimed by @camsim99 View on GitHub
engine P2 platform-android team-android triaged-android
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

To prevent malicious apps from injecting unexpected `Intent` extras during startup, https://github.com/flutter/flutter/pull/190249 introduces a custom lint rule banning direct `Intent.get*Extra` calls in favor of safe wrappers (`IntentUtils.safeGet...Extra`). This issue tracks migrating the remaining exempted files (`FlutterActivity`, `FlutterFragmentActivity`, `FlutterShellArgs`, and `FlutterEngineConnectionRegistry`) to use these safe wrappers, which will verify that `Intent` extra flags are sent from the Flutter app itself in debug/profile mode or otherwise block them (including in release mode).

Files I am sure can be fully migrated:

- [ ] `FlutterActivity.java`
- [ ] `FlutterFragmentActivity.java`
- [ ] `FlutterEngineConnectionRegistry.java`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.