Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Manager authentication errors when using persistent login #44

Closed
joewiz opened this issue Aug 18, 2016 · 5 comments
Closed

User Manager authentication errors when using persistent login #44

joewiz opened this issue Aug 18, 2016 · 5 comments

Comments

@joewiz
Copy link
Member

joewiz commented Aug 18, 2016

As first reported by Alister Pillow at http://markmail.org/message/iow4bfpmeesnzfkd, the Dashboard > User Manager cannot display users or groups when logged in using the "remember me" option selected. The problem is absent when logging in without this checkbox selected.

Specifically, after logging in to Dashboard with the "remember me" checkbox selected, a request to http://localhost:8080/exist/apps/dashboard/plugins/userManager/api/user/ will return an ERROR 500, with the following error in exist.log (also reported in the browser):

2016-08-18 14:26:53,087 [qtp1974513281-37] WARN  (ServletHandler.java [doHandle]:623) -  
javax.servlet.ServletException: An error occurred while processing request to /exist/apps/dashboard/plugins/userManager/api/user/: exerr:ERROR You must be an authenticated user [at line 69, column 38, source: /db/apps/dashboard/plugins/userManager/userManager.xqm]
In function:
    usermanager:get-user(item()*) [44:17:/db/apps/dashboard/plugins/userManager/userManager.xqm]
    usermanager:list-users() [70:5:/db/apps/dashboard/plugins/userManager/userManager.xqm]
    local:list-users(xs:string?) [195:70:/db/apps/dashboard/plugins/userManager/controller.xql]
    at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378) ~[exist-optional.jar:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
Caused by: org.exist.xquery.XPathException: exerr:ERROR You must be an authenticated user [at line 69, column 38, source: /db/apps/dashboard/plugins/userManager/userManager.xqm]
In function:
    usermanager:get-user(item()*) [44:17:/db/apps/dashboard/plugins/userManager/userManager.xqm]
    usermanager:list-users() [70:5:/db/apps/dashboard/plugins/userManager/userManager.xqm]
    local:list-users(xs:string?) [195:70:/db/apps/dashboard/plugins/userManager/controller.xql]
    at org.exist.xquery.functions.securitymanager.UMaskFunction.eval(UMaskFunction.java:79) ~[exist.jar:?]
    at org.exist.xquery.BasicFunction.eval(BasicFunction.java:73) ~[exist.jar:?]
    at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:41) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:81) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:318) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:318) ~[exist.jar:?]
    at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155) ~[exist.jar:?]
    at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74) ~[exist.jar:?]
    at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61) ~[exist.jar:?]
    at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302) ~[exist.jar:?]
    at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223) ~[exist.jar:?]
    at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58) ~[exist.jar:?]
    at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:65) ~[exist.jar:?]
    at org.exist.xquery.ForExpr.processItem(ForExpr.java:239) ~[exist.jar:?]
    at org.exist.xquery.ForExpr.eval(ForExpr.java:179) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:81) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:318) ~[exist.jar:?]
    at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155) ~[exist.jar:?]
    at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74) ~[exist.jar:?]
    at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61) ~[exist.jar:?]
    at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302) ~[exist.jar:?]
    at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223) ~[exist.jar:?]
    at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58) ~[exist.jar:?]
    at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102) ~[exist.jar:?]
    at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:155) ~[exist.jar:?]
    at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:74) ~[exist.jar:?]
    at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61) ~[exist.jar:?]
    at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:302) ~[exist.jar:?]
    at org.exist.xquery.FunctionCall.eval(FunctionCall.java:223) ~[exist.jar:?]
    at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.SequenceConstructor.eval(SequenceConstructor.java:84) ~[exist.jar:?]
    at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.SequenceConstructor.eval(SequenceConstructor.java:84) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.PathExpr.eval(PathExpr.java:267) ~[exist.jar:?]
    at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist.jar:?]
    at org.exist.xquery.XQuery.execute(XQuery.java:253) ~[exist.jar:?]
    at org.exist.xquery.XQuery.execute(XQuery.java:185) ~[exist.jar:?]
    at org.exist.http.urlrewrite.XQueryURLRewrite.runQuery(XQueryURLRewrite.java:697) ~[exist-optional.jar:?]
    at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:256) ~[exist-optional.jar:?]
    ... 30 more

Changing $login to login:set-user on

$login("org.exist.login", (), true()),
solves the problem.

But this bypasses the login-helper, which checks for the presence of the persistent login module. I have no idea why the original code doesn't work.

@joewiz
Copy link
Member Author

joewiz commented Feb 5, 2017

Mentioned today on exist-open: http://markmail.org/message/4oylaivhwqe4pxu3.

@duncdrum
Copy link
Contributor

duncdrum commented Jun 6, 2017

Who knew that there even was a class for Julian Calendar:
screenshot 2017-06-06 09 41 11

@dizzzz
Copy link
Member

dizzzz commented Jun 6, 2017

sun.util ????

@duncdrum
Copy link
Contributor

duncdrum commented Jun 6, 2017

¯\_(ツ)_/¯ something along these lines sun/util/calendar/JulianCalendar.java but mostly ¯\_(ツ)_/¯ I found one mention in exist-db exist/src/org/exist/xquery/value/AbstractDateTimeValue.java

@joewiz
Copy link
Member Author

joewiz commented Jan 26, 2019

Has long been fixed in 1.x and is also not present in dashboard 2.x.

@joewiz joewiz closed this as completed Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants