Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Issue 585583003: Fix case-sensitivity problems in extension content verification (Closed)

Created:
6 years, 3 months ago by asargent_no_longer_on_chrome
Modified:
6 years, 2 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix case-sensitivity problems in extension content verification On case-insensitive filesystems, extensions can generate requests (script src tags, XHR's, etc.) to their own resources using a relative path with incorrect case and have those requests work (see crbug.com/29941 for some history). However, for extension content verification, we were looking up the expected file content hashes using the relative path given in the request, not the actual filename, which meant that any difference in case would be treated as "no hashes for this file". This patch switches to using case-insensitive lookups, but uses a multimap so that case-sensitive filesystems should not experience problems. BUG=412693 TEST=Install the test extension at http://goo.gl/rOpGDu, and turn on content verification to Enforce mode in about:flags. Without this patch, the extension will get force disabled on windows/mac. With the patch, this should be fixed. Committed: https://crrev.com/49264e03b28ad3813382bef032839eddf893fa7e Cr-Commit-Position: refs/heads/master@{#297032}

Patch Set 1 #

Total comments: 1

Patch Set 2 : switched to all-lowercase all-the-time #

Patch Set 3 : undo change to extension_protocols.cc #

Total comments: 2

Patch Set 4 : remove old code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -54 lines) Patch
M extensions/browser/content_hash_fetcher.cc View 1 2 chunks +2 lines, -4 lines 0 comments Download
M extensions/browser/content_hash_reader.cc View 1 1 chunk +1 line, -6 lines 0 comments Download
M extensions/browser/verified_contents.h View 1 2 chunks +15 lines, -5 lines 0 comments Download
M extensions/browser/verified_contents.cc View 1 2 3 2 chunks +21 lines, -9 lines 0 comments Download
M extensions/browser/verified_contents_unittest.cc View 1 2 chunks +64 lines, -26 lines 0 comments Download
M extensions/test/data/content_verifier/README View 1 2 chunks +6 lines, -2 lines 0 comments Download
M extensions/test/data/content_verifier/payload.json View 1 1 chunk +16 lines, -0 lines 0 comments Download
M extensions/test/data/content_verifier/verified_contents.json View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
asargent_no_longer_on_chrome
I'm going to follow up with a separate patch with automated tests to keep this ...
6 years, 3 months ago (2014-09-19 17:23:28 UTC) #2
Ken Rockot(use gerrit already)
https://codereview.chromium.org/585583003/diff/1/extensions/browser/extension_protocols.cc File extensions/browser/extension_protocols.cc (right): https://codereview.chromium.org/585583003/diff/1/extensions/browser/extension_protocols.cc#newcode271 extensions/browser/extension_protocols.cc:271: directory_path_.AppendRelativePath(file_path_, &actual_relative_path); It looks like this may not actually ...
6 years, 3 months ago (2014-09-19 18:03:05 UTC) #3
Ken Rockot(use gerrit already)
On 2014/09/19 18:03:05, Ken Rockot wrote: > https://codereview.chromium.org/585583003/diff/1/extensions/browser/extension_protocols.cc > File extensions/browser/extension_protocols.cc (right): > > https://codereview.chromium.org/585583003/diff/1/extensions/browser/extension_protocols.cc#newcode271 ...
6 years, 3 months ago (2014-09-19 19:43:31 UTC) #4
asargent_no_longer_on_chrome
Ok, ready for re-review. Switched from trying to determine actual path to just using multimap ...
6 years, 2 months ago (2014-09-26 18:31:46 UTC) #5
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/585583003/diff/40001/extensions/browser/verified_contents.cc File extensions/browser/verified_contents.cc (right): https://codereview.chromium.org/585583003/diff/40001/extensions/browser/verified_contents.cc#newcode220 extensions/browser/verified_contents.cc:220: const std::string* VerifiedContents::GetTreeHashRoot( Do you really want to ...
6 years, 2 months ago (2014-09-26 18:48:13 UTC) #6
asargent_no_longer_on_chrome
https://codereview.chromium.org/585583003/diff/40001/extensions/browser/verified_contents.cc File extensions/browser/verified_contents.cc (right): https://codereview.chromium.org/585583003/diff/40001/extensions/browser/verified_contents.cc#newcode220 extensions/browser/verified_contents.cc:220: const std::string* VerifiedContents::GetTreeHashRoot( On 2014/09/26 18:48:13, Ken Rockot (slow ...
6 years, 2 months ago (2014-09-26 18:51:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/585583003/60001
6 years, 2 months ago (2014-09-26 18:52:49 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001) as 5d87331afd6b0e4484e6c0b6815a326b7612af2f
6 years, 2 months ago (2014-09-26 21:15:37 UTC) #10
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 21:16:19 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/49264e03b28ad3813382bef032839eddf893fa7e
Cr-Commit-Position: refs/heads/master@{#297032}

Powered by Google App Engine
This is Rietveld 408576698