RESOLVED FIXED213601
App-bound domain service worker registrations should be limited
https://bugs.webkit.org/show_bug.cgi?id=213601
Summary App-bound domain service worker registrations should be limited
Kate Cheney
Reported 2020-06-25 07:41:46 PDT
We should limit the number of service worker registrations available to app-bound domains
Attachments
Patch (2.55 KB, patch)
2020-06-25 07:49 PDT, Kate Cheney
no flags
Kate Cheney
Comment 1 2020-06-25 07:42:05 PDT
Kate Cheney
Comment 2 2020-06-25 07:49:03 PDT
Brent Fulgham
Comment 3 2020-06-25 10:47:33 PDT
Comment on attachment 402733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402733&action=review > Source/WebCore/workers/service/server/SWServer.cpp:338 > + completionHandler(m_appBoundDomains.contains(domain) && m_scopeToRegistrationMap.keys().size() < maxRegistrationCount); It seems like this code change also limits full web browsers to three registrations. Is that desired?
Kate Cheney
Comment 4 2020-06-25 10:58:17 PDT
Comment on attachment 402733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402733&action=review >> Source/WebCore/workers/service/server/SWServer.cpp:338 >> + completionHandler(m_appBoundDomains.contains(domain) && m_scopeToRegistrationMap.keys().size() < maxRegistrationCount); > > It seems like this code change also limits full web browsers to three registrations. Is that desired? It won't because the completion handler result will only be checked if the entitlement is not present (see SWServer::scheduleJob and SWServer::addRegistrationFromStore). It's a little confusing but we added the check here to prevent the app-bound domains from being read unnecessarily.
Brent Fulgham
Comment 5 2020-06-25 11:09:34 PDT
Comment on attachment 402733 [details] Patch r=me
Kate Cheney
Comment 6 2020-06-25 11:13:37 PDT
Comment on attachment 402733 [details] Patch Thanks!
EWS
Comment 7 2020-06-25 11:16:26 PDT
Committed r263521: <https://trac.webkit.org/changeset/263521> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402733 [details].
Note You need to log in before you can comment on or make changes to this bug.