summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2014-01-15 10:00:51 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-15 10:00:51 -0800
commitf18f8ac477f11dab503fc57c1fac122daa361ec0 (patch)
tree8eb73f53237735f983e49bb431a2f12c0c932296
parent81cb2d1800a0a0aced83225f7f923b0809211001 (diff)
parent7719d6ca3fd4079add8a9648838d99244a237eaf (diff)
downloadpackages_apps_Browser-f18f8ac477f11dab503fc57c1fac122daa361ec0.zip
packages_apps_Browser-f18f8ac477f11dab503fc57c1fac122daa361ec0.tar.gz
packages_apps_Browser-f18f8ac477f11dab503fc57c1fac122daa361ec0.tar.bz2
am 7719d6ca: DO NOT MERGE Do not let intents request viewing private browser files
* commit '7719d6ca3fd4079add8a9648838d99244a237eaf': DO NOT MERGE Do not let intents request viewing private browser files
-rw-r--r--src/com/android/browser/IntentHandler.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java
index e22c5dc..8b3ff1e 100644
--- a/src/com/android/browser/IntentHandler.java
+++ b/src/com/android/browser/IntentHandler.java
@@ -107,6 +107,13 @@ public class IntentHandler {
urlData = new UrlData(mSettings.getHomePage());
}
+ // If url is to view private data files, don't allow.
+ Uri uri = intent.getData();
+ if (uri != null && uri.getScheme().startsWith("file") &&
+ uri.getPath().startsWith(mActivity.getDatabasePath("foo").getParent())) {
+ return;
+ }
+
if (intent.getBooleanExtra(Browser.EXTRA_CREATE_NEW_TAB, false)
|| urlData.isPreloaded()) {
Tab t = mController.openTab(urlData);