diff options
author | Selim Gurun <sgurun@google.com> | 2014-01-15 10:00:51 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-15 10:00:51 -0800 |
commit | f18f8ac477f11dab503fc57c1fac122daa361ec0 (patch) | |
tree | 8eb73f53237735f983e49bb431a2f12c0c932296 /src/com/android/browser | |
parent | 81cb2d1800a0a0aced83225f7f923b0809211001 (diff) | |
parent | 7719d6ca3fd4079add8a9648838d99244a237eaf (diff) | |
download | packages_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
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/IntentHandler.java | 7 |
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); |