Closed Bug 1450199 Opened 6 years ago Closed 6 years ago

Cookie is not synced across tabs

Categories

(Core :: Networking: Cookies, defect, P1)

59 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla61
Tracking Status
firefox-esr52 --- unaffected
firefox59 --- wontfix
firefox60 --- verified
firefox61 --- verified

People

(Reporter: websec02.g02, Assigned: valentin)

References

Details

(Keywords: regression, Whiteboard: [necko-triaged])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180323154952

Steps to reproduce:

Firefox 59.0.2 on Windows7.
Cookie set in a tab is not immediately synced in another tab.

1. Open a tab A - navigate to http://ws9.me/firefox59cookie.html
2. Open a tab B - navigate to http://ws9.me/firefox59cookie.html
3. In tab A, press "Set cookie", then press "Show cookie". A cookie is set in tab A.
4. In tab B, press "Show cookie" button. Cookie is blank.


Actual results:

See above.


Expected results:

In step4 in tab B, cookie should not be empty.

OK: Chrome 56, IE11 and Firefox 56.0.2
NG: Firefox 59.0.2
Attached file firefox59cookie.html
We are also having the same issue. Before upgrade everything was working fine. All of a sudden after upgrade we are facing many issues related to cookie syncing.


Please prioritize this issue and provide a quick solution or workaround if any.
I can reproduce this issue on my machine  	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0

On nightly I followed Steps 1-4. I requires a page refresh before Step 4 to see the cookie from Step 3.

Google Chrome and Edge update dynamically.
Component: Untriaged → Preferences
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Preferences → Networking: Cookies
Product: Firefox → Core
This seems to be a regression caused by bug 1425031.
Blocks: 1425031
Assignee: nobody → valentin.gosu
Keywords: regression
Priority: -- → P1
Whiteboard: [necko-triaged]
Comment on attachment 8968351 [details]
Bug 1450199 - Cookie is not synced across tabs

https://reviewboard.mozilla.org/r/237032/#review243510

Thanks, looks great!

::: commit-message-6276e:6
(Diff revision 1)
> +Bug 1450199 - Cookie is not synced across tabs
> +
> +This patch reverts parts of changeset e87e706def11 (bug 1425031).
> +The problem in bug 1425031 was that when the content process set a cookie
> +a notification was sent to the parent process. This notification was then
> +forwarded to all the content processes, including the one it originatd from.

Nit: "originated"
Attachment #8968351 - Flags: review?(ehsan) → review+
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5f3b781af6a7
Cookie is not synced across tabs r=Ehsan
Comment on attachment 8968351 [details]
Bug 1450199 - Cookie is not synced across tabs

Approval Request Comment
[Feature/Bug causing the regression]:
Bug 1425031

[User impact if declined]:
Cookies changed in one tab are not visible to another tab if the two tabs don't share the same process.

[Is this code covered by automated tests?]:
It has some tests. I am working on a different test for this specific use case.

[Has the fix been verified in Nightly?]:
Just landed in nightly.

[Needs manual test from QE? If yes, steps to reproduce]: 
Yes. See comment 0.

[List of other uplifts needed for the feature/fix]:
None.

[Is the change risky?]:
No.

[Why is the change risky/not risky?]:
This change reverts bug 1425031 and reimplements it in a simpler way. The test for bug 1425031 still passes.

[String changes made/needed]:
None.
Attachment #8968351 - Flags: approval-mozilla-beta?
https://hg.mozilla.org/mozilla-central/rev/5f3b781af6a7
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Comment on attachment 8968351 [details]
Bug 1450199 - Cookie is not synced across tabs

This seems a bit risky to me for late beta (coming up on beta 15)
But I think we should fix this regression from 59. 

Valentin can you file a follow-up bug for writing additional tests?  (And we should uplift these new tests too if possible)

Andrei can your team test this issue, steps in comment 0, to verify the fix in beta 15 next week?
Flags: needinfo?(andrei.vaida)
Attachment #8968351 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
I have managed to reproduce the issue described in comment 0 using Firefox 61.0a1 (BuildId:20180330220126).

This issue is verified fixed using Firefox 61.0a1 (BuildId:20180424013604) and Firefox 60.0b15 (BuildId:20180423171039) on Windows 10 64bit, macOS 10.11.6 and Ubuntu 16.04 64bit.
Status: RESOLVED → VERIFIED
Flags: needinfo?(andrei.vaida)
Regressions: CVE-2023-4055
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: