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

Issue 424463003: Basic Mojo message header validation for JavaScript. (Closed)

Created:
6 years, 5 months ago by hansmuller
Modified:
6 years, 4 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Basic Mojo message header validation for JavaScript. This is the the second part of the original CL for "Validate incoming JS Message Headers", per https://codereview.chromium.org/406993002#msg2. The first part is https://codereview.chromium.org/411553003. TBR=jochen@chromium.org BUG=395801 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286819

Patch Set 1 #

Patch Set 2 : Created a Validator class #

Total comments: 2

Patch Set 3 : Fixed a typo #

Patch Set 4 : Fixed an indent-O #

Total comments: 28

Patch Set 5 : Corrected and improved validator et al #

Patch Set 6 : One last change for JS purists #

Total comments: 4

Patch Set 7 : Corrected isValidRange() #

Total comments: 2

Patch Set 8 : make claimRange() consistent with isValidRange() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -16 lines) Patch
M content/browser/webui/web_ui_data_source_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/webui/web_ui_mojo_browsertest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/content_resources.grd View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/js/bindings/codec.js View 1 2 3 4 6 chunks +35 lines, -11 lines 0 comments Download
M mojo/public/js/bindings/constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/js/bindings/constants.cc View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/js/bindings/router.js View 1 2 3 4 5 3 chunks +8 lines, -4 lines 0 comments Download
A mojo/public/js/bindings/validator.js View 1 2 3 4 5 6 7 1 chunk +114 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
hansmuller
This CL reintroduces the second part of https://codereview.chromium.org/406993002/
6 years, 4 months ago (2014-07-28 21:07:35 UTC) #1
Matt Perry
https://codereview.chromium.org/424463003/diff/20001/mojo/public/js/bindings/validator.js File mojo/public/js/bindings/validator.js (right): https://codereview.chromium.org/424463003/diff/20001/mojo/public/js/bindings/validator.js#newcode64 mojo/public/js/bindings/validator.js:64: (numFields == 2 && numBytes == codec.kMessageHeaderSize) || indent ...
6 years, 4 months ago (2014-07-28 23:59:04 UTC) #2
hansmuller
https://codereview.chromium.org/424463003/diff/20001/mojo/public/js/bindings/validator.js File mojo/public/js/bindings/validator.js (right): https://codereview.chromium.org/424463003/diff/20001/mojo/public/js/bindings/validator.js#newcode64 mojo/public/js/bindings/validator.js:64: (numFields == 2 && numBytes == codec.kMessageHeaderSize) || On ...
6 years, 4 months ago (2014-07-29 00:10:43 UTC) #3
yzshen1
https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/codec.js File mojo/public/js/bindings/codec.js (right): https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/codec.js#newcode363 mojo/public/js/bindings/codec.js:363: var kNumBytesOffset = 0; Maybe we could consider define ...
6 years, 4 months ago (2014-07-29 05:59:53 UTC) #4
yzshen1
+Tom who is our security reviewer. (Thanks Tom!)
6 years, 4 months ago (2014-07-29 06:04:36 UTC) #5
Tom Sepez
I'll defer to yzshen on the correctness of the algorithm. We don't have exactly the ...
6 years, 4 months ago (2014-07-29 16:32:54 UTC) #6
hansmuller
Changes per the review feedback. https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/codec.js File mojo/public/js/bindings/codec.js (right): https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/codec.js#newcode21 mojo/public/js/bindings/codec.js:21: return offset >= 0 ...
6 years, 4 months ago (2014-07-29 19:06:23 UTC) #7
yzshen1
https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/validator.js File mojo/public/js/bindings/validator.js (right): https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/validator.js#newcode33 mojo/public/js/bindings/validator.js:33: if (numBytes < 0 || this.offset + numBytes > ...
6 years, 4 months ago (2014-07-30 17:14:56 UTC) #8
hansmuller
I've made the suggested corrections. https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/validator.js File mojo/public/js/bindings/validator.js (right): https://codereview.chromium.org/424463003/diff/50001/mojo/public/js/bindings/validator.js#newcode33 mojo/public/js/bindings/validator.js:33: if (numBytes < 0 ...
6 years, 4 months ago (2014-07-30 18:32:30 UTC) #9
yzshen1
https://codereview.chromium.org/424463003/diff/110001/mojo/public/js/bindings/validator.js File mojo/public/js/bindings/validator.js (right): https://codereview.chromium.org/424463003/diff/110001/mojo/public/js/bindings/validator.js#newcode51 mojo/public/js/bindings/validator.js:51: this.offset += start + numBytes; This line needs to ...
6 years, 4 months ago (2014-07-30 18:36:07 UTC) #10
hansmuller
https://codereview.chromium.org/424463003/diff/110001/mojo/public/js/bindings/validator.js File mojo/public/js/bindings/validator.js (right): https://codereview.chromium.org/424463003/diff/110001/mojo/public/js/bindings/validator.js#newcode51 mojo/public/js/bindings/validator.js:51: this.offset += start + numBytes; On 2014/07/30 18:36:07, yzshen1 ...
6 years, 4 months ago (2014-07-30 19:13:31 UTC) #11
yzshen1
LGTM Thanks!
6 years, 4 months ago (2014-07-30 19:14:11 UTC) #12
hansmuller
The CQ bit was checked by hansmuller@chromium.org
6 years, 4 months ago (2014-07-30 19:16:12 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hansmuller@chromium.org/424463003/130001
6 years, 4 months ago (2014-07-30 19:17:55 UTC) #14
hansmuller
jochen - I've updated the following files because I added a public Mojo Java module ...
6 years, 4 months ago (2014-07-30 19:36:34 UTC) #15
hansmuller
asargent, scheib - I've updated the following file because I added a public Mojo Java ...
6 years, 4 months ago (2014-07-30 19:46:21 UTC) #16
scheib
extensions/renderer/dispatcher.cc LGTM
6 years, 4 months ago (2014-07-30 20:17:26 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-07-30 21:20:15 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-30 21:24:17 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/1070)
6 years, 4 months ago (2014-07-30 21:24:18 UTC) #20
hansmuller
On 2014/07/30 19:36:34, hansmuller wrote: > jochen - I've updated the following files because I ...
6 years, 4 months ago (2014-07-31 14:38:11 UTC) #21
hansmuller
The CQ bit was checked by hansmuller@chromium.org
6 years, 4 months ago (2014-07-31 14:38:22 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hansmuller@chromium.org/424463003/130001
6 years, 4 months ago (2014-07-31 14:39:28 UTC) #23
jochen (gone - plz use gerrit)
lgtm
6 years, 4 months ago (2014-07-31 14:50:14 UTC) #24
hansmuller
On 2014/07/31 14:50:14, jochen wrote: > lgtm Thanks!
6 years, 4 months ago (2014-07-31 15:08:19 UTC) #25
commit-bot: I haz the power
6 years, 4 months ago (2014-07-31 16:44:47 UTC) #26
Message was sent while issue was closed.
Change committed as 286819

Powered by Google App Engine
This is Rietveld 408576698