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

Issue 615543004: Fix remoting NM hosts to verify that incoming messages are dictionaries. (Closed)

Created:
6 years, 2 months ago by Sergey Ulanov
Modified:
6 years, 2 months ago
Reviewers:
Wez, kelvinp
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix remoting NM hosts to verify that incoming messages are dictionaries. After crrev.com/295851 the PipeMessagingChannel verifies that incoming messages are dictionaries and then passes them as base::Value to OnMessage() and then OnMessage() implementation static_cast<> them to base::DictionaryValue. This is fragile, and also it shouldn't be PipeMessagingChannel's responsibility to verify format of the messages it reads. Moved the check to OnMessage() implementations. Committed: https://crrev.com/c827ad1c743fa8eb5d33f609f6a1e1a317af7c1a Cr-Commit-Position: refs/heads/master@{#297274}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -6 lines) Patch
M remoting/host/it2me/it2me_native_messaging_host.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M remoting/host/native_messaging/pipe_messaging_channel.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M remoting/host/setup/me2me_native_messaging_host.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
Sergey Ulanov
6 years, 2 months ago (2014-09-29 19:18:03 UTC) #2
chromium-reviews
Why not use GetAsDictionary, to keep things type-safe? On 29 Sep 2014 20:18, <sergeyu@chromium.org> wrote: ...
6 years, 2 months ago (2014-09-29 19:29:55 UTC) #3
Sergey Ulanov
On Mon, Sep 29, 2014 at 12:29 PM, Wez <wez@google.com> wrote: > Why not use ...
6 years, 2 months ago (2014-09-29 19:43:38 UTC) #4
Wez
Fair point. In that case, at least use IsType(). :) On 29 Sep 2014 20:43, ...
6 years, 2 months ago (2014-09-29 20:14:37 UTC) #5
kelvinp
lgtm
6 years, 2 months ago (2014-09-29 20:20:48 UTC) #6
Sergey Ulanov
On 2014/09/29 20:14:37, Wez wrote: > Fair point. > > In that case, at least ...
6 years, 2 months ago (2014-09-29 20:34:28 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615543004/1
6 years, 2 months ago (2014-09-29 20:35:37 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as 1086b167b42d2c2b751eaa8ea58d4f69c194f999
6 years, 2 months ago (2014-09-29 21:30:28 UTC) #10
commit-bot: I haz the power
6 years, 2 months ago (2014-09-29 21:33:21 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/c827ad1c743fa8eb5d33f609f6a1e1a317af7c1a
Cr-Commit-Position: refs/heads/master@{#297274}

Powered by Google App Engine
This is Rietveld 408576698