of course ;-)
appadmin sets
session.secure()
which turns the session cookie into a secure cookie and it cannot go
over http, only https.
You can disable this by commenting session.secure() in appadmin.py
Massimo
On Jul 30, 10:14 am, Iceberg <[email protected]> wrote:
> webfaction day2: the auto-logout problem and why
> ====================================
>
> Many coincidence lead to the "auto-logout (lost session)" problem.
> Here is a how-to which you shall not follow. :-)
>
> Problem: Even the web2py welcome app on webfaction tends to ask me to
> re-login often, due to something is wrong with the session.
>
> How to reproduce the problem:
>
> 1. Follow the official "latest stable source" install script [1] to
> setup web2py as normal.
>
> 2. Setup an http site for normal use, and an httpS site for admin. And
> as usual, both sites map "/" as URL path to the same web2py instance.
>
> 3. Due to lack of domain resource at the beginning, I setup both sites
> with the same only domain I have, MY_ACCOUNT.webfactional.com. (This
> is coincidence 1. I should better use different domain names, such
> aswww.top_level_domain.comfor normal site, and
> admin.top_level_domain.com for the admin site.) (And, later I know
> that I can use the ip string as a second domain, to avoid all later
> problem.)
>
> 4. Visithttp://MY_ACCOUNT.webfactional.com/welcome/default/index,
> register a new web2py welcome account, then login, you will see a
> "Welcome your_first_name" at the upper-right corner.
>
> 5. Use SAME browser, open a new tab, to
> visithttps://MY_ACCOUNT.webfactional.com/appadmin/index, page shows up
> fine. (This is coincidence 2. If I use another browser to open a new
> window hence a new session, I should be fine.)
>
> 6. At this moment, the session file is somehow replaced, so when you
> use your same browser to
> visithttp://MY_ACCOUNT.webfactional.com/welcome/default/index
> , you will notice you have been automatically logout.
>
> Now you see, two coincidence together lead to the auto-logout problem.
> No wonder few webfaction-web2py users met same problem. But it did
> cost me several hours to trace down the culprit. What a day2 lesson in
> my webfactoin life. :-/
>
> Sincerely,
> Iceberg, 2010-Jul-30, 22:22(PM), Fri
>
> [1]http://wiki.webfaction.com/wiki/Web2py-LatestSource