Skip to content

fix(cells): secure file sharing [WPB-26687] PR 6#5081

Draft
MohamadJaara wants to merge 1 commit into
mo/share-forward-05-stability-baselinesfrom
mo/share-forward-06-cells-sharing-safety
Draft

fix(cells): secure file sharing [WPB-26687] PR 6#5081
MohamadJaara wants to merge 1 commit into
mo/share-forward-05-stability-baselinesfrom
mo/share-forward-06-cells-sharing-safety

Conversation

@MohamadJaara

@MohamadJaara MohamadJaara commented Jul 21, 2026

Copy link
Copy Markdown
Member

https://wearezeta.atlassian.net/browse/WPB-26687

Goal

Keep the narrowed FileProvider surface introduced by this stack while restoring Cells file open and share flows.

Issue

  1. Download a file through Cells.
  2. Open it in an external app or share it.
  3. Cells passes the file from the app-specific external-files directory directly to FileProvider.
  4. The narrowed provider paths reject that location, so URI creation fails.

Changes

  • Move the secure sharing helpers into core:ui-common so both the app and Cells use the same policy.
  • Link or copy only the selected Cells file into the dedicated file-provider-shares cache directory before creating its URI.
  • Keep pre-Android 15 Wire targets excluded from the chooser.
  • Enable trusted share identity on Android 15 and newer.
  • Add regression coverage for Cells open/share flows and shared-cache path confinement.

Security

The provider configuration is not widened. External apps receive a temporary read grant for a URI under the dedicated shared-cache root only, and untrusted display names cannot escape that directory.

Stack

  1. #5033
  2. #5034
  3. #5035
  4. #5036
  5. #5037
  6. This PR

Depends on #5037.

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