diff options
author | Selim Gurun <sgurun@google.com> | 2014-01-10 16:24:00 -0800 |
---|---|---|
committer | Selim Gurun <sgurun@google.com> | 2014-01-11 01:20:49 +0000 |
commit | 00c679463b20c4502393ecbe73b03b205fbc80c8 (patch) | |
tree | e5863ca71da4c70ade49de422c3a612d69dd68df /src | |
parent | 84e92b9a43097a1252d7311204d2c4ce00c5a78a (diff) | |
download | packages_apps_Browser-00c679463b20c4502393ecbe73b03b205fbc80c8.zip packages_apps_Browser-00c679463b20c4502393ecbe73b03b205fbc80c8.tar.gz packages_apps_Browser-00c679463b20c4502393ecbe73b03b205fbc80c8.tar.bz2 |
DO NOT MERGE Do not let intents request viewing private browser files
Bug: 9793586
Change-Id: I8f6f03b05556ee4d6846c15752de9be54c003060
(cherry picked from commit 348cca6c61e1ad3f2d580298d9ec5f1826f64269)
Diffstat (limited to 'src')
-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 45520d6..5b79fb1 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); |