New issue
Advanced search Search tips

Issue 850035 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 30
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Cannot open file in browser when file name contains %

Project Member Reported by yamaguchi@chromium.org, Jun 6 2018

Issue description

Chrome Version: confirmed on 66.0.3359.108 and 69.0.3452.0
Network info: should be online to secure access to Drive files

Steps To Reproduce:
(1) Create a Google Document in My Drive.
(2) Rename the document title to "%41%42%43".
(3) Find the file in the Files app and double-click it.

Expected Result:
The document opens in a new tab successfully.

Actual Result:
"Your file was not found" error appears in a new tab.
If the unescaping result matches another file, that file will open instead. In case of this example, "ABC" in the same directory will open if exists.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)
Always, if file name matches the pattern.

What is the impact to the user, and is there a workaround? If so, what is
it?
workaround:
- open drive.google.com and open the file from there.
- or rename the file/title not to contain % character.


 
Labels: Security
This bug might be abused to make user open a different file from what user tried to open.
I am still not sure if this deserves a security concern, but labeling as Security just in case.
Status: Assigned (was: Started)
Hi yamaguchi@ - Just checking in on the status for this bug. Was the pending patch in Comment 1 committed?
Status: Started (was: Assigned)
It turned out the pending patch at Patch Set 8 breaks existing test (and maybe the actual behavior) of ARC. So it needs redesign and more work.
Labels: -M-68 M-69
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/168217547c0e5a091bb63d5919103d75ca97eeb6

commit 168217547c0e5a091bb63d5919103d75ca97eeb6
Author: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Date: Fri Jul 27 11:40:19 2018

Escape path string before storing as externalfile URL path.

Resolve errors on Chrome OS with opening Drive files whose file name
contains a valid URL-encoding like "%41.pdf".


Test: unit_tests --gtest_filter=ExternalFileURLUtilTest.*:FileManagerPathUtilConvertUrlTest.*
Bug:  850035 
Change-Id: If4768ae07f82d722065601192d557eaea53b3f12
Reviewed-on: https://chromium-review.googlesource.com/1151172
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578599}
[modify] https://crrev.com/168217547c0e5a091bb63d5919103d75ca97eeb6/chrome/browser/chromeos/file_manager/path_util_unittest.cc
[modify] https://crrev.com/168217547c0e5a091bb63d5919103d75ca97eeb6/chrome/browser/chromeos/fileapi/external_file_url_util.cc
[modify] https://crrev.com/168217547c0e5a091bb63d5919103d75ca97eeb6/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc

Labels: Merge-Request-69
Project Member

Comment 9 by sheriffbot@chromium.org, Jul 28

Labels: -Merge-Request-69 Hotlist-Merge-Approved Merge-Approved-69
Your change meets the bar and is auto-approved for M69. Please go ahead and merge the CL to branch 3497 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 30

Labels: -merge-approved-69 merge-merged-3497
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/386fe8c9efaf884835aab942baac676fe52ee49e

commit 386fe8c9efaf884835aab942baac676fe52ee49e
Author: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Date: Mon Jul 30 02:47:26 2018

Escape path string before storing as externalfile URL path.

Resolve errors on Chrome OS with opening Drive files whose file name
contains a valid URL-encoding like "%41.pdf".


Test: unit_tests --gtest_filter=ExternalFileURLUtilTest.*:FileManagerPathUtilConvertUrlTest.*
Bug:  850035 
Change-Id: If4768ae07f82d722065601192d557eaea53b3f12
Reviewed-on: https://chromium-review.googlesource.com/1151172
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#578599}(cherry picked from commit 168217547c0e5a091bb63d5919103d75ca97eeb6)
Reviewed-on: https://chromium-review.googlesource.com/1154548
Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#200}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/386fe8c9efaf884835aab942baac676fe52ee49e/chrome/browser/chromeos/file_manager/path_util_unittest.cc
[modify] https://crrev.com/386fe8c9efaf884835aab942baac676fe52ee49e/chrome/browser/chromeos/fileapi/external_file_url_util.cc
[modify] https://crrev.com/386fe8c9efaf884835aab942baac676fe52ee49e/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment