[web2py] Re: session id is set to none with login_bare

2013-07-14 Thread Massimo Di Pierro
I this still an open issue? If so, please open a ticket on google code. On Friday, 5 July 2013 10:45:06 UTC-5, Vikas Gupta wrote: > > > The client is an adroid app. I am getting the session_id as none in this > function > > def myTestUserLoginFunc(): > > import json > import gluon.contrib

[web2py] Re: session id is set to none with login_bare

2013-07-09 Thread Vikas Gupta
For me the issue is that this also prints None, so no session_id logger.debug("session id - %s " % response.session_id) -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it,

[web2py] Re: session id is set to none with login_bare

2013-07-09 Thread Anthony
Note, there is no session.session_id or response.session_status, and response.session_file_name should be response.session_filename. On Tuesday, July 9, 2013 9:23:57 AM UTC-4, Alan Etkin wrote: > > Version 2.6.0-development+timestamp.2013.07.08.01.37.54 > > El martes, 9 de julio de 2013 02:35:24

[web2py] Re: session id is set to none with login_bare

2013-07-09 Thread Alan Etkin
Version 2.6.0-development+timestamp.2013.07.08.01.37.54 El martes, 9 de julio de 2013 02:35:24 UTC-3, Vikas Gupta escribió: > > anyone? kinda critical for me... > Both with login_bare and without it (having logged in with an Auth form), with Firefox 21 and using the browser as client I get: I

[web2py] Re: session id is set to none with login_bare

2013-07-08 Thread Vikas Gupta
anyone? kinda critical for me... On Friday, July 5, 2013 9:15:06 PM UTC+5:30, Vikas Gupta wrote: > > > The client is an adroid app. I am getting the session_id as none in this > function > > def myTestUserLoginFunc(): > > import json > import gluon.contrib.simplejson > > import gluon

[web2py] Re: session[id]

2013-01-04 Thread Annet
Hi Derek, It seems to me that you are storing data in the session which should > actually be linked to the auth_user table. > No, this has nothing to do with Auth, it's about a node drive application, with data needed in every view stored in session. Kind regards, Annet --

[web2py] Re: session[id]

2013-01-03 Thread Derek
It seems to me that you are storing data in the session which should actually be linked to the auth_user table. On Thursday, January 3, 2013 1:39:10 AM UTC-7, Annet wrote: > > Massimo, > > Thanks for your reply. > > It is not clear to me what you are storing in session. > > > I have a table 'node

[web2py] Re: session[id]

2013-01-03 Thread Annet
Massimo, Thanks for your reply. It is not clear to me what you are storing in session. I have a table 'node' and tables which reference this table by 'nodeID'. Nodes have accounts, depending on the kind of account their web site has menu items linking to web pages. All these pages extend a la

[web2py] Re: session[id]

2013-01-02 Thread Massimo Di Pierro
It is not clear to me what you are storing in session. This: id=int(request.args(0)) account=db(db.nodeAccount.nodeID==id).select(db.nodeAccount.ALL).first() ... session[id] looks like a security vulnerability to me. Every user can access any record of the table and add to the c

[web2py] Re: session[id]=Storage(id=id) between controllers

2012-11-01 Thread Niphlod
> > Because there are exceptions, at the moment your solution solves the > problem, in a next iteration I'll probably solve it differently. > What exceptions ? request.args(0, default=0, cast=int, otherwise=something) does exactly the same thing I described try: int(request.args(0)) excep

[web2py] Re: session[id]=Storage(id=id) between controllers

2012-11-01 Thread Annet
Hi, Thanks for providing me with a solution. > > request.args(0,default=0, cast=int, otherwise=URL(...)) > > PS: if it's recurrent I wonder why you aren't normalizing it already as > with > try: > arg0 = int(request.args(0)) > except: > redirect() > Because there are exceptions, at th

[web2py] Re: session[id]=Storage(id=id) between controllers

2012-10-31 Thread Niphlod
request.args(0,default=0, cast=int, otherwise=URL(...)) PS: if it's recurrent I wonder why you aren't normalizing it already as with try: arg0 = int(request.args(0)) except: redirect() :P On Wednesday, October 31, 2012 6:26:44 PM UTC+1, Annet wrote: > > Hi Massimo, > > Thanks for your reply,

[web2py] Re: session[id]=Storage(id=id) between controllers

2012-10-31 Thread Annet
Hi Massimo, Thanks for your reply, the cause of the problem is that in the router function session[id] is based on request.args(0), whereas in id=get_ID(auth,session) if session[id]: it is based on nodeID which is of type int. Since my whole app is node driven, the issue of request.args(0) bei

[web2py] Re: session[id]=Storage(id=id) between controllers

2012-10-31 Thread Annet
Hi Massimo, Thanks for your reply. Somewhere else in your logic you are changing this. > I've gone through my applications logic, session[id] is being created in a router function: def router(): if not len(request.args): redirect(URL('addressbook','index')) else: id=req

[web2py] Re: session[id]=Storage(id=id) between controllers

2012-10-31 Thread Massimo Di Pierro
Somewhere else in your logic you are changing this. On Wednesday, 31 October 2012 05:53:46 UTC-5, Annet wrote: > > In my node based app I create the following object > session[id]=Storage(id=id) in which I store some data and menus the first > time the index page of a site is loaded. After that

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Annet
Hi Anthony, I meant if "r" does not exist within session -- although "r" exists at the > top level, there is no session.r defined, is there? > No, session[id] is defined, session.r is not. Now I understand why f=r['Nav']['function'] if f: session[id].f=True does work. Thanks for

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Anthony
> > If so, if you do session[id].r and r does not exist, the Storage object >> will return None. > > > r does exist, otherwise this condition would fail: elif > r['NodeNav']['frontend']: > I meant if "r" does not exist within session -- although "r" exists at the top level, there is no session

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Annet
> Is session[id] a Storage object? Yes. If so, if you do session[id].r and r does not exist, the Storage object > will return None. r does exist, otherwise this condition would fail: elif r['NodeNav']['frontend']: If you try to do session[id].r['Nav'], it will attempt to subscript None

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Anthony
Is session[id] a Storage object? If so, if you do session[id].r and r does not exist, the Storage object will return None. If you try to do session[id].r['Nav'], it will attempt to subscript None with 'Nav', which won't work. Anthony On Tuesday, August 14, 2012 12:36:22 PM UTC-4, Annet wrote:

[web2py] Re: Session id gets re-used

2010-04-19 Thread mdipierro
This is a feature. The web2py session (mapped to a file or db record) is one thing, the auth session (logical) is another. The web2py session is linked to your browser session. The auth session affects whether you are logged in or not. You may want the server to remember you or not whether you are

Re: [web2py] Re: Session id gets re-used

2010-04-19 Thread Thadeus Burgess
The session ID is only unique between your web browser and your application. Try this test using two different web browsers. -- Thadeus On Mon, Apr 19, 2010 at 1:21 AM, Adi wrote: > Update: > > This seems to work in user(): > >  if request.args(0) == 'login': >      session.clear() > > Am I

[web2py] Re: Session id gets re-used

2010-04-18 Thread Adi
Update: This seems to work in user(): if request.args(0) == 'login': session.clear() Am I doing something wrong or unnecessary? On Apr 19, 10:57 am, Adi wrote: > Hi all, > > In my application, the session id seems to be getting re-used across > different sessions. > > To explain: > > Lo