bool IsSensitivePath(const base::FilePath& path) {Gemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool IsSensitivePath(const base::FilePath& path) {Gemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Looking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1
maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromium
that might help?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool IsSensitivePath(const base::FilePath& path) {Daniel MurphyGemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Looking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromiumthat might help?
Ok, this mostly matches https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a now.
I don't see a good way to share the logic, given the layering.
Differences:
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
bool IsSensitivePath(const base::FilePath& path) {Daniel MurphyGemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Nate ChapinLooking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromiumthat might help?
Ok, this mostly matches https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a now.
I don't see a good way to share the logic, given the layering.
Differences:
- We can't rely on content URIs already been filtered for us (that logic looks more like the general chrome logic in chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc)
- Gemini thinks we should block `file://` urls because they're effectively absolute paths. I'm not certain whether we can get `file://` urls here.
I think we can install file:// urls on desktop on non-android, so we might? But happy to block here for now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
bool IsSensitivePath(const base::FilePath& path) {Daniel MurphyGemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Nate ChapinLooking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromiumthat might help?
Daniel MurphyOk, this mostly matches https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a now.
I don't see a good way to share the logic, given the layering.
Differences:
- We can't rely on content URIs already been filtered for us (that logic looks more like the general chrome logic in chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc)
- Gemini thinks we should block `file://` urls because they're effectively absolute paths. I'm not certain whether we can get `file://` urls here.
I think we can install file:// urls on desktop on non-android, so we might? But happy to block here for now.
Non-android, sure. But this android-specific code. I'll leave it for now, and can remove it in a followup if you think that makes sense.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
hartmanng: PTAL at `chrome/browser/android/webapps/twa_launch_queue_delegate.cc`
bool IsSensitivePath(const base::FilePath& path) {Daniel MurphyGemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Nate ChapinLooking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromiumthat might help?
Daniel MurphyOk, this mostly matches https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a now.
I don't see a good way to share the logic, given the layering.
Differences:
- We can't rely on content URIs already been filtered for us (that logic looks more like the general chrome logic in chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc)
- Gemini thinks we should block `file://` urls because they're effectively absolute paths. I'm not certain whether we can get `file://` urls here.
Nate ChapinI think we can install file:// urls on desktop on non-android, so we might? But happy to block here for now.
Non-android, sure. But this android-specific code. I'll leave it for now, and can remove it in a followup if you think that makes sense.
hartmanng, do you have an opinion here on whether the file:// case needs to be considered?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
bool IsSensitivePath(const base::FilePath& path) {Daniel MurphyGemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Nate ChapinLooking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromiumthat might help?
Daniel MurphyOk, this mostly matches https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a now.
I don't see a good way to share the logic, given the layering.
Differences:
- We can't rely on content URIs already been filtered for us (that logic looks more like the general chrome logic in chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc)
- Gemini thinks we should block `file://` urls because they're effectively absolute paths. I'm not certain whether we can get `file://` urls here.
Nate ChapinI think we can install file:// urls on desktop on non-android, so we might? But happy to block here for now.
Nate ChapinNon-android, sure. But this android-specific code. I'll leave it for now, and can remove it in a followup if you think that makes sense.
hartmanng, do you have an opinion here on whether the file:// case needs to be considered?
I've never heard of a file:// URL being used for a TWA. Doesn't mean it's never happened, but it should be extremely uncommon. I think it's ok to block it.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
bool IsSensitivePath(const base::FilePath& path) {Daniel MurphyGemini decided what cases to filter here. It passes a sniff test, but I'm not confident I've thought of every case 😊
Nate ChapinLooking at other bugs, I see:
https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;bpv=1;bpt=1maybe other at:
https://source.chromium.org/search?q=::ConfirmSensitiveEntryAccess%20&sq=&ss=chromiumthat might help?
Daniel MurphyOk, this mostly matches https://source.chromium.org/chromium/chromium/src/+/main:android_webview/browser/file_system_access/aw_file_system_access_permission_context.cc;l=59;drc=6921036f402c9e2fecd9f01ea498bb836934a72a now.
I don't see a good way to share the logic, given the layering.
Differences:
- We can't rely on content URIs already been filtered for us (that logic looks more like the general chrome logic in chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc)
- Gemini thinks we should block `file://` urls because they're effectively absolute paths. I'm not certain whether we can get `file://` urls here.
Nate ChapinI think we can install file:// urls on desktop on non-android, so we might? But happy to block here for now.
Nate ChapinNon-android, sure. But this android-specific code. I'll leave it for now, and can remove it in a followup if you think that makes sense.
Glenn Hartmannhartmanng, do you have an opinion here on whether the file:// case needs to be considered?
I've never heard of a file:// URL being used for a TWA. Doesn't mean it's never happened, but it should be extremely uncommon. I think it's ok to block it.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
FileSystemAccess: Block sensitive paths in TWA launch
A malicious Android application could bypass the FileSystemAccess API
blocklist to obtain read and write access to arbitrary files within
Chrome's private data directory via TWA launch intents.
This CL implements path validation in TwaLaunchQueueDelegate to block
sensitive paths (parent references, Chrome's own Content URIs, app data
and cache directories, system directories).
It also modifies LaunchQueue to gracefully clear invalid paths instead
of crashing or bypassing the check.
TAG=agy
CONV=614f9db2-61b7-44b4-830b-5ebe9a33ae04
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |