Projects tigase _server server-core Issues #938
Can't authorise (#938)
wojciech.kapcia@tigase.net opened 7 years ago

tigase-issue #8.0.0-SNAPSHOT-b5163 from 2018-04-09. Default installation (next-next in web installer, hence default schema), derby.

Can't authenticate and attempting to use /admin/ via http-api (with http included in debug) throws:

2018-04-09 17:50:41.566 [http-server-pool-1]  Servlet.service()                    FINE:     exception processing request
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at tigase.db.AuthRepository$DefaultCredentials.getFirst(AuthRepository.java:298)
        at tigase.http.ServiceImpl.checkCredentials(ServiceImpl.groovy:93)
        at tigase.http.java.DummyServletRequest.getUserPrincipal(DummyServletRequest.java:407)
        at tigase.http.modules.admin.Servlet.processRequest(Servlet.java:123)
        at tigase.http.modules.admin.Servlet.service(Servlet.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at tigase.http.java.RequestHandler.handle(RequestHandler.java:123)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
        at tigase.http.java.JavaStandaloneHttpServer$ExecutorWithTimeout.lambda$0(JavaStandaloneHttpServer.java:171)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

(submitting to tigase-server as it seems to be with AuthRepository / credentials handling).

I ran into same problem with my old installation using MySQL. Credentials are available in tig_user_credentials.

wojciech.kapcia@tigase.net commented 7 years ago
  • after installing using web-installer (derby) user is inserted into tig_users but it's not present in tig_user_credentials.
  • in MySQL case, after running upgrade the details of the user are present in tig_user_credentials but only with PLAIN mechanism.

As for AdminUI - if the autorization fails for some reason an appropriate error should be shown instead of displaying blank page (and including error with FINE level in the logs)

wojciech.kapcia@tigase.net commented 7 years ago

on derby - create admin account has account_status = -1

Andrzej Wójcik (Tigase) commented 7 years ago

Fixed both issues.

wojciech.kapcia@tigase.net commented 7 years ago

Works!

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
7280
Version
tigase-server-8.0.0rc1
Spent time
13h 45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#938
Please wait...
Page is in error, reload to recover