You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Xiangdong Huang (Jira)" <ji...@apache.org> on 2020/11/07 03:12:00 UTC

[jira] [Commented] (IOTDB-988) NULLPointer when there is no password in login

    [ https://issues.apache.org/jira/browse/IOTDB-988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227706#comment-17227706 ] 

Xiangdong Huang commented on IOTDB-988:
---------------------------------------

This issue is a little duplicated with #985

> NULLPointer when there is no password in login
> ----------------------------------------------
>
>                 Key: IOTDB-988
>                 URL: https://issues.apache.org/jira/browse/IOTDB-988
>             Project: Apache IoTDB
>          Issue Type: Bug
>    Affects Versions: 0.11.0
>            Reporter: Xiangdong Huang
>            Priority: Major
>              Labels: easy-fix
>
> How to reproduce: 
> run iotdb-grafana and access http://127.0.0.1:8888/search
> INFO  [2020-11-07 09:15:50,930] [main] org.apache.iotdb.db.service.IoTDB:91 - IoTDB has started. 
> ERROR [2020-11-07 09:15:54,365] [pool-6-IoTDB-RPC-Client-thread-1] org.apache.thrift.ProcessFunction:47 - Internal error processing openSession 
> java.lang.NullPointerException: null
> 	at org.apache.iotdb.db.utils.AuthUtils.encryptPassword(AuthUtils.java:163)
> 	at org.apache.iotdb.db.auth.authorizer.BasicAuthorizer.login(BasicAuthorizer.java:105)
> 	at org.apache.iotdb.db.service.TSServiceImpl.openSession(TSServiceImpl.java:223)
> 	at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$openSession.getResult(TSIService.java:2083)
> 	at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$openSession.getResult(TSIService.java:2063)
> 	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
> 	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:313)
> 	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)
> It is because login() does not check whether the password is null.
> @Override
>   public boolean login(String username, String password) throws AuthException {
>     User user = userManager.getUser(username);
>     return user != null && user.getPassword().equals(AuthUtils.encryptPassword(password));
>   }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)