Bug 1405438 - Production cookies being sent to sub-domains
Summary: Production cookies being sent to sub-domains
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: User Interface
Version: 5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 5.0
Assignee: PnT DevOps Devs
QA Contact: tools-bugs
URL:
Whiteboard:
: 1406270 1409700 1411376 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-16 14:04 UTC by Michael Simacek
Modified: 2018-12-09 06:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-19 04:45:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Simacek 2016-12-16 14:04:00 UTC
Description of problem:
When I'm not logged in and go to advanced search, I can select a classification, but trying to select a product throws an error.

How reproducible:
always on https://beta.bugzilla.redhat.com/bugzilla/query.cgi

Steps to Reproduce:
1. if logged in, log out
2. go to advanced search, select a classification (e.g. Fedora)
3. click into the product field

Actual results:
Error: The cookies or token provide were not valid or have expired. You may login again to get new cookies or a new token.

Expected results:
It should show a list of products without requiring auth.

Comment 1 Matt Tyson 🤬 2016-12-18 23:56:10 UTC
This is happening because the browser is using a login cookie that does not exist in the database.

When the Bugzilla RPC interface goes to authenticate that cookie, an exception is thrown as the cookie does not exist.

Production bugzilla seems to have this same issue as well.

I suspect what is happening in this case is that because the beta site logincookie is gone (beta.bugzilla.redhat.com) the browser is falling back to the production cookie (bugzilla.redhat.com)

This problem is probably coming about because of the confusion of domain names.

Comment 2 Matt Tyson 🤬 2017-01-09 03:19:20 UTC
*** Bug 1409700 has been marked as a duplicate of this bug. ***

Comment 3 Jeff Fearn 🐞 2017-01-09 22:55:03 UTC
*** Bug 1411376 has been marked as a duplicate of this bug. ***

Comment 6 Jeff Fearn 🐞 2017-01-18 08:42:13 UTC
This is apparently all working as per the RFC.

http://erik.io/blog/2014/03/04/definitive-guide-to-cookie-domains/

It appears we should empty the domain in the production cookies and that will make it so browsers don't send the production cookies to sub-domains.

Comment 7 Jeff Fearn 🐞 2017-01-18 12:18:17 UTC
*** Bug 1406270 has been marked as a duplicate of this bug. ***

Comment 8 Jeff Fearn 🐞 2017-01-19 04:45:41 UTC
When we go to the public beta we will rename the server so it's not a sub-domain of production.


Note You need to log in before you can comment on or make changes to this bug.