Bug 105454 - [WK2 NetworkProcess] Cannot log into gmail/facebook with private browsing enabled
Summary: [WK2 NetworkProcess] Cannot log into gmail/facebook with private browsing ena...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-12-19 12:25 PST by Alexey Proskuryakov
Modified: 2012-12-20 12:09 PST (History)
4 users (show)

See Also:


Attachments
proposed fix (2.47 KB, patch)
2012-12-19 12:38 PST, Alexey Proskuryakov
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-12-19 12:25:09 PST
Cannot log into gmail/facebook with private browsing enabled.

A wrong storage session is used after a redirect. This is because ResourceHandle::willSendRequest() first sets storage session, and then calls the client. NetworkProcess client in particular doesn't preserve the storage session, because it cannot be serialized for IPC.

I don't think that the client should be able to change storage session, even for WebKit1, where NSURLRequest is part of API.

<rdar://problem/12896478>
Comment 1 Alexey Proskuryakov 2012-12-19 12:38:45 PST
Created attachment 180209 [details]
proposed fix
Comment 2 Brady Eidson 2012-12-19 12:40:48 PST
Comment on attachment 180209 [details]
proposed fix

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

> Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:565
> +    // Client call may not preserve the session, especially it the request is sent over IPC.
> +    request.setStorageSession(d->m_storageSession.get());

s/especially it/especially if/

> Source/WebCore/platform/network/mac/ResourceHandleMac.mm:478
> +    // Client call may not preserve the session, especially it the request is sent over IPC.
> +    request.setStorageSession(d->m_storageSession.get());

s/especially it/especially if/
Comment 3 Alexey Proskuryakov 2012-12-19 13:07:18 PST
Committed <http://trac.webkit.org/changeset/138191>.
Comment 4 Roger Fong 2012-12-20 11:44:33 PST
It looks like this causes 12 test cases on Win7 to crash:

http://build.webkit.org/results/Apple%20Win%207%20Release%20(Tests)/r138191%20(31080)/results.html
Comment 5 Alexey Proskuryakov 2012-12-20 12:09:45 PST
Filed bug 105563.