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

Issue 2779083005: Make content verification see 0-byte files. (Closed)

Created:
3 years, 8 months ago by lazyboy
Modified:
3 years, 8 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make content verification see 0-byte files. Currently ContentVerifyJob never sees DoneReading() for (legitimate or not) 0-byte files. This means 0-byte files (legitimate or corrupted) never goes through content verification process. Override URLRequestJob::DoneReading() in URLRequestExtensionJob to detect the end of 0-byte files so that ContentVerifyJob knows about these 0-byte files. Add a test to ensure that URLRequestExtensionJob will see 0-byte files. ContentVerifyJobUnittest.DeletedAndMissingFiles already makes sure that 0-byte read will fail content verification. BUG=703888, 703892 Test=With content verification turned on (e.g. with --extension-content-verification=enforce_strict flag), install an extension from webstore and modify a JS content inside that extension to 0 byte file. Content verification should fail for that extension. If the extension is part of system policy, the extension will be reinsalled. Review-Url: https://codereview.chromium.org/2779083005 Cr-Commit-Position: refs/heads/master@{#460638} Committed: https://chromium.googlesource.com/chromium/src/+/e83ab9c6c27deb3e96dee4a33a6518c206724d16

Patch Set 1 #

Patch Set 2 : Rebase to dependent CL. #

Total comments: 2

Patch Set 3 : add file size sanity check #

Patch Set 4 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -4 lines) Patch
M chrome/browser/extensions/extension_protocols_unittest.cc View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
M extensions/browser/extension_protocols.cc View 1 1 chunk +7 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (7 generated)
lazyboy
Depends on https://codereview.chromium.org/2771953003/, but much easier to read :)
3 years, 8 months ago (2017-03-29 18:10:14 UTC) #4
Devlin
lgtm https://codereview.chromium.org/2779083005/diff/40001/chrome/browser/extensions/extension_protocols_unittest.cc File chrome/browser/extensions/extension_protocols_unittest.cc (right): https://codereview.chromium.org/2779083005/diff/40001/chrome/browser/extensions/extension_protocols_unittest.cc#newcode558 chrome/browser/extensions/extension_protocols_unittest.cc:558: const char kFooJsContents[] = ""; // Empty. This ...
3 years, 8 months ago (2017-03-29 18:29:48 UTC) #5
lazyboy
https://codereview.chromium.org/2779083005/diff/40001/chrome/browser/extensions/extension_protocols_unittest.cc File chrome/browser/extensions/extension_protocols_unittest.cc (right): https://codereview.chromium.org/2779083005/diff/40001/chrome/browser/extensions/extension_protocols_unittest.cc#newcode558 chrome/browser/extensions/extension_protocols_unittest.cc:558: const char kFooJsContents[] = ""; // Empty. On 2017/03/29 ...
3 years, 8 months ago (2017-03-29 20:09:59 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2779083005/80001
3 years, 8 months ago (2017-03-30 01:20:06 UTC) #9
commit-bot: I haz the power
3 years, 8 months ago (2017-03-30 03:20:09 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/e83ab9c6c27deb3e96dee4a33a65...

Powered by Google App Engine
This is Rietveld 408576698