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 889323002: Allow SW registration only if it's secure AND it's HTTP or HTTPS (Closed)

Created:
5 years, 10 months ago by kinuko
Modified:
5 years, 10 months ago
Reviewers:
falken, nhiroki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+serviceworker, kinuko+watch, Kunihiko Sakamoto
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow SW registration only if it's secure AND it's HTTP or HTTPS BUG=453982 TEST=tested manually TEST=content_unittests:ServiceWorkerDispatcherHostTest.Register_FileSystem* Committed: https://crrev.com/22394d843a6c36eb2e6d7bdf4fb8e7c4b7ae8d68 Cr-Commit-Position: refs/heads/master@{#314143}

Patch Set 1 #

Total comments: 8

Patch Set 2 : revised #

Patch Set 3 : check unregister too #

Total comments: 6

Patch Set 4 : #

Patch Set 5 : added simple tests #

Patch Set 6 : remove LOG(ERROR) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -40 lines) Patch
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 5 8 chunks +29 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host_unittest.cc View 1 2 3 4 6 chunks +85 lines, -33 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
kinuko
Does this look to be the right fix? Can someone review?
5 years, 10 months ago (2015-02-02 05:40:01 UTC) #2
falken
This looks like the right fix, the spec says SW should be HTTPS only with ...
5 years, 10 months ago (2015-02-02 06:01:23 UTC) #3
nhiroki
https://codereview.chromium.org/889323002/diff/1/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/889323002/diff/1/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode55 content/browser/service_worker/service_worker_dispatcher_host.cc:55: bool OriginCanAccessServiceWorkers(const GURL& url) { This function is only ...
5 years, 10 months ago (2015-02-02 06:14:27 UTC) #4
kinuko
Fixed the patch and did manual testing. Currently the error message is terrible, suggestions are ...
5 years, 10 months ago (2015-02-02 07:59:42 UTC) #5
nhiroki
LGTM after tests get fixed https://codereview.chromium.org/889323002/diff/40001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/889323002/diff/40001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode38 content/browser/service_worker/service_worker_dispatcher_host.cc:38: "The URL is not ...
5 years, 10 months ago (2015-02-02 08:37:43 UTC) #6
falken
I'm a bit confused, if we check Blink-side for document_url is HTTP or HTTPS, wouldn't ...
5 years, 10 months ago (2015-02-02 08:44:04 UTC) #7
kinuko
On 2015/02/02 08:44:04, falken wrote: > I'm a bit confused, if we check Blink-side for ...
5 years, 10 months ago (2015-02-02 09:07:00 UTC) #8
kinuko
Thanks! https://codereview.chromium.org/889323002/diff/40001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/889323002/diff/40001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode88 content/browser/service_worker/service_worker_dispatcher_host.cc:88: OriginCanAccessServiceWorkers(document_url); On 2015/02/02 08:37:43, nhiroki (slow) wrote: > ...
5 years, 10 months ago (2015-02-02 09:43:25 UTC) #9
kinuko
Added a simple unittest too.
5 years, 10 months ago (2015-02-02 11:04:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/889323002/80001
5 years, 10 months ago (2015-02-02 11:05:49 UTC) #12
falken
On 2015/02/02 11:22:20, horo wrote: > The CQ bit was unchecked by mailto:horo@chromium.org Oops, the ...
5 years, 10 months ago (2015-02-02 11:25:53 UTC) #14
kinuko
On 2015/02/02 11:25:53, falken wrote: > On 2015/02/02 11:22:20, horo wrote: > > The CQ ...
5 years, 10 months ago (2015-02-02 12:38:47 UTC) #15
falken
LGTM
5 years, 10 months ago (2015-02-02 12:46:37 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/889323002/100001
5 years, 10 months ago (2015-02-02 12:47:40 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_gn_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_gn_rel/builds/3955)
5 years, 10 months ago (2015-02-02 12:55:22 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/889323002/100001
5 years, 10 months ago (2015-02-02 13:18:17 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-02 14:17:00 UTC) #23
commit-bot: I haz the power
5 years, 10 months ago (2015-02-02 14:18:55 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/22394d843a6c36eb2e6d7bdf4fb8e7c4b7ae8d68
Cr-Commit-Position: refs/heads/master@{#314143}

Powered by Google App Engine
This is Rietveld 408576698