Hi,

Is there any good reason that toolbar.module is setting cookies for unauthenticaed users? As this is just a feature shipped for authenticated users it feels a little redundant. The reason I'm askin/filing a bug report, is that this destroy some of the logic with most reverse caching proxies. It is easily fixable in both Drupal (disable the module) or in the reverse proxy (unsetting the cookie), but I'd just like to shed some light on the problem.

Comments

crifi’s picture

Version: 7.0 » 8.x-dev
Category: bug » feature
Status: Needs review » Active

This needs no review. In my opinion this is not directly a bug. It's a kind of change request for D8.

vegardx’s picture

I agree with you, and would also like to extend the feature request. A lot of modules keep setting cookies, and unless you inspect the code or headers, they can be difficult to spot. A status page where all cookies being set by various modules would solve this, more or less, as you'd then be able to easily track and unset cookies that are causing problems.

cweagans’s picture

Category: feature » bug
Priority: Minor » Normal

This is a bug. Toolbar shouldn't be setting cookies. Let's try to find a way around it.

bcobin’s picture

I suspect this is stopping Varnish (which won't run if cookies are set for anonymous users) - I'm using Open Public and Toolbar is required for certain features, so I can't easily disable the module. Is there another way around this? I see "unsetting the cookie" as an option - how would I do this?

Thank you for any help...

cweagans’s picture

You can fix it in your Varnish VCL. There's usually a place where the VCL ignores google analytics cookies and the like, so you can add the toolbar cookie to that place in your varnish vcl.

bcobin’s picture

Thanks, cwegans - working with my hosting company and I think they've figured that one out, actually. It's a matter of finding the offending culprit now.

Thanks for the quick response - much appreciated!

Wim Leers’s picture

Version: 8.x-dev » 7.x-dev
Issue summary: View changes

This is definitely not the case for the new toolbar in D8.