Repository navigation
Fix DatabaseViewerActivity against malicious external access and injection attacks - #4759
Draft
TranceLove wants to merge 1 commit into
Draft
TranceLove wants to merge 1 commit into
TranceLove wants to merge 1 commit into
Conversation
- Make DatabaseViewerActivity non-exported so other apps cannot make it root-copy protected databases. - Copy root-only databases to the app-private cache dir instead of the shared external cache dir. - Quote table identifiers in PRAGMA/SELECT queries. - HTML-encode column names and cell values before loading into WebView. - Add Robolectric tests for markup escaping and non-exported activity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Harden database viewer against external access and injection
root-copy protected databases.
shared external cache dir.
Automatic tests
Manual tests
Done
Device:
OS:
Build tasks success
Successfully running following tasks on local:
./gradlew assembledebug./gradlew spotlessCheckGenerative code
This PR used generative code tools (GenAI, LLMs, etc.)
Model: Claude Sonnet
Version: 5.5
Provider: Github Copilot
Credits: Md. Raisul Islam Mobin (contact@mobin.tech / https://mobin.tech/) for spotting out the issue. Thanks!