Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/src/main/res/xml/provider_paths.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<files-path
name="files"
path="." />

<external-path
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

The external-path element exposes the entire Download/ directory and all its subdirectories to other apps through FileProvider. This creates a broad security surface since any file placed in Download/ can now be shared via content URIs. Consider using external-files-path with getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS) instead, which provides app-specific external storage that doesn't require broad access permissions and is automatically cleaned up when the app is uninstalled.

Suggested change
<external-path
<external-files-path

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

About Copilot’s suggestion to use <external-files-path>

This app intentionally uses <external-path path="Download/" /> because the exported files (custom RPC configs) are meant to be directly accessible by the user in the public Download/Kizzy/ directory.
The main goal of this feature is to let users easily locate, edit, or share their exported configuration without needing developer tools or special file access.

Using <external-files-path> would place the file inside /Android/data/<package>/files/Download/, which is not visible to most file managers on Android 11+ due to scoped storage restrictions.
That would make the “Export Config” feature confusing and effectively unusable for end users.

The chosen implementation limits access to the Download/ directory only (and its subdirectories), which is acceptable for user-generated exports and does not expose sensitive app data.

In short, this is a deliberate design choice prioritizing user accessibility over isolation, within a controlled and predictable export path.

name="downloads"
path="Download/" />
</paths>