Issue Details (XML | Word | Printable)

Key: MODPYTHON-149
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Graham Dumpleton
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

Allow cross subdomain sessions.

Created: 21/Mar/06 07:48 AM   Updated: 11/Apr/07 11:36 AM
Return to search
Component/s: session
Affects Version/s: None
Fix Version/s: 3.3.1

Time Tracking:
Not Specified

Resolution Date: 27/Apr/06 12:23 PM


 Description  « Hide
When session class creates cookie, it does not explicitly set the "domain" attribute. This means that the session will only apply to the specific site the request was targeted at. This precludes a single server hosting multiple virtual host subdomains under a parent domain and a session being shared across these sites.

The code could perhaps be enhanced to allow an option to be set to force the inclusion of a "domain" attribute in the cookie for the session much like it currently allows with the "path" attribute. The option for the latter is "ApplicationPath". As noted in MODPYTHON-127 there is an intent to properly namespace these mod_python options so maybe there should be an option:

  mod_python.Session.application_domain

with Session code implementing following in make_cookie() method:

        if config.has_key("mod_python.Session.application_domain"):
            c.domain = config["mod_python.Session.application_domain"]

Setting the domain though would only be required if you want cross site session cookies within an enclosing domain, it would not be required for a single site.

Depending on whether multiple applications are being hosted on sites under the same domain, an application may also want to override the session cookie name and session cookie path to avoid conflicts between multiple applications when doing this.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #397404 Thu Apr 27 05:22:27 UTC 2006 grahamd Added support for cross domain session objects. (MODPYTHON-149)
Files Changed
MODIFY /httpd/mod_python/trunk/Doc/modpython4.tex
MODIFY /httpd/mod_python/trunk/test/test.py
MODIFY /httpd/mod_python/trunk/lib/python/mod_python/__init__.py
MODIFY /httpd/mod_python/trunk/Doc/appendixc.tex
MODIFY /httpd/mod_python/trunk/lib/python/mod_python/Session.py
MODIFY /httpd/mod_python/trunk/src/include/mpversion.h

Graham Dumpleton added a comment - 27/Apr/06 09:12 AM
Following on from further discussions on option naming, as per MODPYTHON-127, option will now be called:

  mod_python.session.application_domain

Graham Dumpleton made changes - 27/Apr/06 11:50 AM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Graham Dumpleton made changes - 27/Apr/06 12:23 PM
Resolution Fixed [ 1 ]
Fix Version/s 3.3 [ 12310101 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Graham Dumpleton made changes - 11/Apr/07 11:36 AM
Status Resolved [ 5 ] Closed [ 6 ]