Bug 207803 - Do not send the client URL to network process when unregistering a service worker registration
Summary: Do not send the client URL to network process when unregistering a service wo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-14 18:17 PST by youenn fablet
Modified: 2020-02-17 11:26 PST (History)
3 users (show)

See Also:


Attachments
Patch (17.96 KB, patch)
2020-02-14 18:20 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (18.78 KB, patch)
2020-02-14 19:27 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (18.71 KB, patch)
2020-02-17 10:02 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-02-14 18:17:13 PST
Do not send the client URL to network process.
This is unnecessary and somehow unsafe.
Comment 1 youenn fablet 2020-02-14 18:20:54 PST
Created attachment 390847 [details]
Patch
Comment 2 youenn fablet 2020-02-14 19:27:33 PST
Created attachment 390850 [details]
Patch
Comment 3 Darin Adler 2020-02-16 22:22:58 PST
Comment on attachment 390850 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390850&action=review

> Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:296
> +        auto iterator = m_clientOrigins.find(clientIdentifier);
> +        if (iterator != m_clientOrigins.end())
> +            clientData = server().serviceWorkerClientWithOriginByID(iterator->value, clientIdentifier);
> +        if (!clientData)
> +            return { };

I think this would read better like this:

    auto iterator = m_clientOrigins.find(clientIdentifier);
    if (iterator == m_clientOrigins.end())
        return { };
    auto clientData = server().serviceWorkerClientWithOriginByID(iterator->value, clientIdentifier);
    if (!clientData)
        return { };
Comment 4 youenn fablet 2020-02-17 10:02:10 PST
Created attachment 390929 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2020-02-17 11:24:01 PST
Comment on attachment 390929 [details]
Patch for landing

Clearing flags on attachment: 390929

Committed r256749: <https://trac.webkit.org/changeset/256749>
Comment 6 WebKit Commit Bot 2020-02-17 11:24:02 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-02-17 11:26:28 PST
<rdar://problem/59518840>