Chromium Code Reviews
DescriptionMake 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 #
Messages
Total messages: 12 (7 generated)
|
||||||||||||||||||||||||||||