Description

The order cookies related to their cookie path are handled is changed between 1.8 (and before) and 1.9 .

Steps to reproduce

The following procedure describes one specific problem in one specific setup. There could be more incompatibilities caused by changes in the cookie handling. We have a wiki farm on one domain. So we have wikis http://test/a, http://test/b and so on. At one point in time there was one wiki at the root of http://test. All these wikis have created cookies in the client browsers. To reproduce this setup, one hast to edit/create cookies in the browser or change wiki locations like explained above.

First of all a browser with a clean cookie cache is needed. The browser should accept cookies. A plugin to examine/edit cookies is helpful.

To reproduce with a cookie editor (like the Web Developer plugin for FF):

  1. Have a wiki with logins on http://test/a

  2. Manually set a cookie or just change the path to "/" of a existing cookie for the wiki in your browser
    • Name MOIN_SESSION
    • Value 0e257e5192ec08251dd113a9d9491330c444400c (random)
    • Host test
    • <!> Path /

    • Secure No
    • Valid to <date in future>

  3. Surf to http://test/a

  4. Login
  5. Visit any other side like http://test/a/test or reload the page.

  6. You are logged out.

To reproduce only with wikis:

  1. Have a wiki with logins on http://test/

    • The default cookie_path for this wiki will be "/"
  2. Login this wiki with your browser.
  3. Change the location of the wiki to http://test/a and restart the web server.

    • The default cookie_path for this wiki will be "/a"
  4. Surf to http://test/a

  5. Login
  6. Visit any other side like http://test/a/test or reload the page.

  7. You are logged out.

After both procedures there will be two cookies in the cache. Example:

It looks like the order for looking up cookies has changed. When evaluating if a user is logged in first of all the cookie on the root of the domain is looked up, while it is not deleted when logging in.

In 1.8.x we had no problems with stray cookies with a root path.

Component selection

Details

MoinMoin Version

1.9.0

OS and Version

SunOS sun 5.10 Generic_142901-03 i86pc i386 i86pc

Python Version

Python 2.6.1

Server Setup

Apache 2.2.11 with mod_wsgi/3.1

Server Details

mpm_prefork

Language you are using the wiki in (set in the browser/UserPreferences)

de

Workaround

Discussion

Just some notes / additional infos:

Currently, it is a bit unclear still, what exactly is going wrong and how it has to be changed to improve it. Because of wsgi/werkzeug-related refactoring, the cookie and session code is very different in 1.9 compared to 1.8.

Note to anonymous bug reporter: could you please create an account here and subscribe to this page, so you get notified about changes here?

Ideas:

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.9CookiePathHandlingChanged (last edited 2010-01-13 17:20:34 by p5B174CC5)