The object of my meditation:
to find most flexible, protected and simple in use
solution and forget about this suxx forever. Insignificant admissible
limitations for this solution are: non portable (only Unix), non secure
against packet sniffering (this is a task for SSL). This solution must
not depend on mod_perl and mod_rewrite (these modules not enabled on many
web hostings) but work well with these modules.
Ideal solution must work automagically and not depend on used template system. Example of interface to such solution:
use POWER::Session; %userdata = load_session(); ... if ($need_to_store_something) { $userdata{something} = $somevalue; save_session(%userdata); }
The winning solution at this time use mangled URLs and
symlinks.
I'm never see before solutions with symlinks, so please meditate to find
weakness which I don't see right now and find solutions for already known
weakness.
Update:Now with readmore tag, thanx to pdcawley :)
In this table shown which features required for ideal solution. Legend:
| Param | mean using <INPUT TYPE=HIDDEN NAME=id_sess VALUE="1234567890"> in forms and /path/script.cgi?id_sess=1234567890 in URLs. |
| URL (after path) | mean using /path/script.cgi/1234567890 |
| URL (at root) | mean using /1234567890/path/script.cgi |
| Feature/Method | BasicAuth | Cookie | Param | URL (after path) | URL (at root) |
|---|---|---|---|---|---|
| Sessions for anonymous (not logged in) users | N | Y | Y | Y | Y |
| Protect against malicious user enter into someone else's active session | see below | ||||
| Possibility to have many simultaneous logins for the same user from different browsers/hosts | Y | Y | Y | Y | Y |
| Possibility to have different sessions in different browser windows (to allow many simultaneous logins, for ex. as ADMIN and as USER) | N | N | Y | Y | Y |
| "Open in New Window" work without problems | Y | Y | see below | ||
| "Back" button work without problems | Y | Y | Y | Y | Y |
| Custom login form (only password, or id+email, or ...) | N | Y | Y | Y | Y |
| Work with disabled cookies in browser | Y | N | Y | Y | Y |
| Work with disabled JavaScript in browser | Y | Y | Y | Y | Y |
| Do not affect search engines spiders | Y | Y | Y | see below | |
| Do not affect page relevance on search engines | Y | Y | Y | Y | see below |
| Session work automagically, i.e. no necessity to programmer/designer keep in mind sessions and do something dull like adding session id to all forms and links | Y | Y | N | N | Y |
| Relative links in HTML (<A HREF="../index.html">) don't affect session | Y | Y | N | N | Y |
| I'm sure I forgot some of features, but I hope my idea is clear. | |||||
About some of these features:
Some details:at this time my sessions work this way:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tired of session/cookie problem
by ejf (Hermit) on Apr 25, 2002 at 13:54 UTC | |
|
•Re: Tired of session/cookie problem
by merlyn (Sage) on Apr 25, 2002 at 16:15 UTC | |
by Fletch (Bishop) on Apr 25, 2002 at 17:07 UTC | |
|
Re: Tired of session/cookie problem
by drewbie (Chaplain) on Apr 25, 2002 at 13:58 UTC | |
|
Re: Tired of session/cookie problem
by asdfgroup (Beadle) on Apr 25, 2002 at 13:53 UTC | |
|
Re: Tired of session/cookie problem
by perrin (Chancellor) on Apr 25, 2002 at 18:19 UTC | |
|
Filling my window...
by pdcawley (Hermit) on Apr 25, 2002 at 13:38 UTC | |
|
Re: Tired of session/cookie problem
by BUU (Prior) on Apr 25, 2002 at 12:52 UTC | |
|
Re: Tired of session/cookie problem
by BUU (Prior) on Apr 25, 2002 at 14:05 UTC |