]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/todo/use_secure_cookies_for_ssl_logins.mdwn
ikiwiki (3.20140916) unstable; urgency=low
[git.ikiwiki.info.git] / doc / todo / use_secure_cookies_for_ssl_logins.mdwn
1 [[!template id=gitbranch branch=smcv/ready/sslcookie-auto author="[[smcv]]"]]
2 [[!tag patch]]
4 At the moment `sslcookie => 0` never creates secure cookies, so if you log in
5 with SSL, your browser will send the session cookie even over plain HTTP.
6 Meanwhile `sslcookie => 1` always creates secure cookies, so you can't
7 usefully log in over plain http.
9 This branch adds `sslcookie => 0, sslcookie_auto => 1` as an option; this
10 uses the `HTTPS` environment variable, so if you log in over SSL you'll
11 get a secure session cookie, but if you log in over HTTP, you won't.
12 (The syntax for the setup file is pretty rubbish - any other suggestions?)
14 > Does this need to be a configurable option at all? The behavior could
15 > just be changed in the sslcookie = 0 case. It seems sorta reasonable
16 > that, once I've logged in via https, I need to re-login if I then
17 > switch to http.
19 >> Even better. I've amended the branch to have this behaviour, which
20 >> turns it into a one-line patch. --[[smcv]]
22 > And, if your change is made, the sslcookie option could probably itself
23 > be dropped too -- at least I don't see a real use case for it if ikiwiki
24 > is more paranoid about cookies by default.
26 >> I haven't done that; it might make sense to do so, but I think it'd be
27 >> better to leave it in as a safety-catch (or in case someone's
28 >> using a webserver that doesn't put `$HTTPS` in the environment). --s
30 > Might be best to fix
31 > [[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]]
32 > first, so that dual https/http sites can better be set up. --[[Joey]]
34 >> Thanks for merging that! :-) --s
36 [[merged|done]] --[[Joey]]