You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/08/24 02:55:24 UTC

[GitHub] [shardingsphere] hongfuli opened a new issue #7017: [ShardingShpere-Proxy] Empty data packet

hongfuli opened a new issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017


   ## Bug Report
   ### Which version of ShardingSphere did you use?
   master branch
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   The data packet may be empty in some scenarios, for example, the login password is empty.
   
   I'm not sure it is correct  as the follow modification(replace `>=` with `>`) 
   
   ```java
       @Override
       public boolean isValidHeader(final int readableBytes) {
           return readableBytes >= MySQLPacket.PAYLOAD_LENGTH + MySQLPacket.SEQUENCE_LENGTH;
       }
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017#issuecomment-679191595


   @hongfuli Yes, you are right. Would you like to submit a PR?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] hongfuli commented on issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
hongfuli commented on issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017#issuecomment-679186563


   If encounter `Authentication Method Mismatch` case, the server sends `Auth Switch Request` packet to client and then the client sends `Auth Switch Response` only contains header if the password is empty, because the username had been exchanged in the previous initial handshake. The following is capture data of complete auth phase:
   
   <img width="1325" alt="Capturing_from_Loopback__lo0" src="https://user-images.githubusercontent.com/837054/91062173-93d4e380-e656-11ea-9e88-6d00b9f01362.png">
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] hongfuli commented on issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
hongfuli commented on issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017#issuecomment-679192470


   sure no problem.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017#issuecomment-678891599


   Hi, @hongfuli Thanks for your issue.
   Besides, are you interested in raizing a PR to fix it?
   If you worry about your modification, I think a unit test is expected in your PR as well. Moreover, our committers will also give it a review.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017#issuecomment-678925217


   @hongfuli Can you show more examples? I had never met a single header transfer on the wire.
   
   As to the empty password you mentioned, the username is not empty at the same time. There're also Client Capabilities/Charset/Client Auth Plugin information in the Login request packet.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 closed issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
tuohai666 closed issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 closed issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
tuohai666 closed issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] hongfuli edited a comment on issue #7017: [ShardingSphere-Proxy] Empty data packet

Posted by GitBox <gi...@apache.org>.
hongfuli edited a comment on issue #7017:
URL: https://github.com/apache/shardingsphere/issues/7017#issuecomment-679186563


   @tuohai666 
   If encounter `Authentication Method Mismatch` case, the server sends `Auth Switch Request` packet to client and then the client sends `Auth Switch Response` only contains header if the password is empty, because the username had been exchanged in the previous initial handshake. The following is capture data of complete auth phase:
   
   <img width="1325" alt="Capturing_from_Loopback__lo0" src="https://user-images.githubusercontent.com/837054/91062173-93d4e380-e656-11ea-9e88-6d00b9f01362.png">
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org