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

Issue 2411733002: Check the format of an applicationServerKey when used to register a push subscription. (Closed)

Created:
4 years, 2 months ago by harkness
Modified:
4 years, 2 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, awdf+watch_chromium.org, Peter Beverloo, johnme+watch_chromium.org, haraken, blink-reviews, harkness+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check the format of an applicationServerKey when used to register a push subscription. The Web Push specificatoion requires applicationServerKeys to be valid VAPID keys, but we have not previous enforced that, which has led to issues where web developers attempt to subscribe with invalid keys. The error eventually returned is not informative. This CL adds code in Blink to do some basic sanity checking that the provided value is syntactically valid. Although the spec only allows p256 keys to be valid, this code also allows the web developer to subscribe with a numeric sender ID as an argument to subscribe() instead of specifying it in the manifest file, but checks that the ID provided is a number. This CL also adds testing for the new syntax checking. BUG=636022 Committed: https://crrev.com/3f9e6105d28fbb930d90e38c23d07a9af9b53dbc Cr-Commit-Position: refs/heads/master@{#425649}

Patch Set 1 #

Patch Set 2 : Removed unneeded file #

Total comments: 4

Patch Set 3 : Convert tests to LayoutTests #

Total comments: 8

Patch Set 4 : Formatting and code review comments #

Patch Set 5 : More formatting #

Patch Set 6 : More formatting #

Patch Set 7 : More formatting #

Messages

Total messages: 19 (11 generated)
harkness
This ended up being completely disjoint code from the original, so I just created a ...
4 years, 2 months ago (2016-10-11 14:32:31 UTC) #3
Peter Beverloo
Thanks! Meta comment: Please don't delete CLs. Just close them. One comment on the CLs ...
4 years, 2 months ago (2016-10-11 15:10:41 UTC) #4
harkness
Re: meta-comment - previous CL closed, not deleted. CL description updated. I think this captures ...
4 years, 2 months ago (2016-10-14 13:53:55 UTC) #6
Peter Beverloo
lgtm % the formatting change we discussed https://codereview.chromium.org/2411733002/diff/40001/third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html File third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html (right): https://codereview.chromium.org/2411733002/diff/40001/third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html#newcode40 third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html:40: e.message, /The ...
4 years, 2 months ago (2016-10-14 14:36:30 UTC) #7
harkness
https://codereview.chromium.org/2411733002/diff/40001/third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html File third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html (right): https://codereview.chromium.org/2411733002/diff/40001/third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html#newcode40 third_party/WebKit/LayoutTests/http/tests/push_messaging/application-server-key-format-test.html:40: e.message, /The provided applicationServerKey is not valid./); On 2016/10/14 ...
4 years, 2 months ago (2016-10-14 15:13:47 UTC) #8
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/2411733002/120001
4 years, 2 months ago (2016-10-17 10:28:40 UTC) #15
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 2 months ago (2016-10-17 10:34:51 UTC) #17
commit-bot: I haz the power
4 years, 2 months ago (2016-10-17 10:38:09 UTC) #19
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/3f9e6105d28fbb930d90e38c23d07a9af9b53dbc
Cr-Commit-Position: refs/heads/master@{#425649}

Powered by Google App Engine
This is Rietveld 408576698