login

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

login

Pietro Liuzzo
Dear all,

I am facing again some login problems. I am using exist 3.2 on Linux 3.13.0-121-generic

I am now using in the controller the login logic used in this controller 

as I found suggested in a post. I just do always what it does only as fallback.

This works very well, allows me to login and logout from the main page but as soon as the page is reloaded after submitting form data with some other parameters the app logs out and it looses the user and password data. 

I am not sure I understand all in the example, but I think I understand that it looks for a parameter user: if there is one, then it logs in and creates a session to which several attributes are attached, else it uses the available session data. 

I have tested with console:log() to see what happened of my session attributes on a page reload (submitting a form) and indeed on the login they are correctly added to the session, but on reloading they disappear, and the else statement does not find them. Where am I destroying my session data?

Does anyone have any suggestion on where I can further look to find out what is going on? 

Thanks a lot!

All best


--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: login

Pietro Liuzzo
Dear all,

it seams I have managed to work around some parts of this problem.

I reintroduced the persistent login module and I modified the nginx configuration with sendfile off and cached the proxy_cookie_path.
It has indeed been a trial and mistake process and I am not sure what actually made it work.

I think the changes to nginx allowed the cookie to be read, but then I was not able to logout, I think this is done now by the persistent login module. 

However testing login and logout repeatedly I sometimes get this error

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/dict/: exerr:ERROR err:FORG0006: effectiveBooleanValue: first item of '(Pietro, Pietro)' is not a node, and sequence length > 1 [at line 61, column 9]
In function:
	login:set-user(xs:string, xs:string?, xs:dayTimeDuration?, xs:boolean) [73:5:jar:file:/etc/exist/lib/extensions/exist-modules.jar!/org/exist/xquery/modules/persistentlogin/login.xql]
	login:set-user(xs:string, xs:dayTimeDuration?, xs:boolean) [209:29:jar:file:/etc/exist/lib/extensions/exist-modules.jar!/org/exist/xquery/modules/persistentlogin/login.xql]
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:396)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.exist.xquery.XPathException: exerr:ERROR err:FORG0006: effectiveBooleanValue: first item of '(Pietro, Pietro)' is not a node, and sequence length > 1 [at line 61, column 9]
In function:
	login:set-user(xs:string, xs:string?, xs:dayTimeDuration?, xs:boolean) [73:5:jar:file:/etc/exist/lib/extensions/exist-modules.jar!/org/exist/xquery/modules/persistentlogin/login.xql]
	login:set-user(xs:string, xs:dayTimeDuration?, xs:boolean) [209:29:jar:file:/etc/exist/lib/extensions/exist-modules.jar!/org/exist/xquery/modules/persistentlogin/login.xql]
	at org.exist.xquery.value.AbstractSequence.effectiveBooleanValue(AbstractSequence.java:165)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:99)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155)
	at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74)
	at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61)
	at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302)
	at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223)
	at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155)
	at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74)
	at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61)
	at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302)
	at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.value.FunctionReference.eval(FunctionReference.java:82)
	at org.exist.xquery.DynamicFunctionCall.eval(DynamicFunctionCall.java:76)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.PathExpr.eval(PathExpr.java:276)
	at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:82)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.PathExpr.eval(PathExpr.java:276)
	at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:318)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.PathExpr.eval(PathExpr.java:276)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.XQuery.execute(XQuery.java:253)
	at org.exist.xquery.XQuery.execute(XQuery.java:185)
	at org.exist.http.urlrewrite.XQueryURLRewrite.runQuery(XQueryURLRewrite.java:697)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:256)
	... 30 more

Caused by:

org.exist.xquery.XPathException: exerr:ERROR err:FORG0006: effectiveBooleanValue: first item of '(Pietro, Pietro)' is not a node, and sequence length > 1 [at line 61, column 9]
In function:
	login:set-user(xs:string, xs:string?, xs:dayTimeDuration?, xs:boolean) [73:5:jar:file:/etc/exist/lib/extensions/exist-modules.jar!/org/exist/xquery/modules/persistentlogin/login.xql]
	login:set-user(xs:string, xs:dayTimeDuration?, xs:boolean) [209:29:jar:file:/etc/exist/lib/extensions/exist-modules.jar!/org/exist/xquery/modules/persistentlogin/login.xql]
	at org.exist.xquery.value.AbstractSequence.effectiveBooleanValue(AbstractSequence.java:165)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:99)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.LetExpr.eval(LetExpr.java:111)
	at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155)
	at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74)
	at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61)
	at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302)
	at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223)
	at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155)
	at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74)
	at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61)
	at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302)
	at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.value.FunctionReference.eval(FunctionReference.java:82)
	at org.exist.xquery.DynamicFunctionCall.eval(DynamicFunctionCall.java:76)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.PathExpr.eval(PathExpr.java:276)
	at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:82)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.PathExpr.eval(PathExpr.java:276)
	at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:318)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58)
	at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.PathExpr.eval(PathExpr.java:276)
	at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
	at org.exist.xquery.XQuery.execute(XQuery.java:253)
	at org.exist.xquery.XQuery.execute(XQuery.java:185)
	at org.exist.http.urlrewrite.XQueryURLRewrite.runQuery(XQueryURLRewrite.java:697)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:256)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:396)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)

Thanks a lot for any hint about this!

All best

Pietro

2017-07-16 23:26 GMT+02:00 Pietro Liuzzo <[hidden email]>:
Dear all,

I am facing again some login problems. I am using exist 3.2 on Linux 3.13.0-121-generic

I am now using in the controller the login logic used in this controller 

as I found suggested in a post. I just do always what it does only as fallback.

This works very well, allows me to login and logout from the main page but as soon as the page is reloaded after submitting form data with some other parameters the app logs out and it looses the user and password data. 

I am not sure I understand all in the example, but I think I understand that it looks for a parameter user: if there is one, then it logs in and creates a session to which several attributes are attached, else it uses the available session data. 

I have tested with console:log() to see what happened of my session attributes on a page reload (submitting a form) and indeed on the login they are correctly added to the session, but on reloading they disappear, and the else statement does not find them. Where am I destroying my session data?

Does anyone have any suggestion on where I can further look to find out what is going on? 

Thanks a lot!

All best


--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...