File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class ServerHandshake extends Command {
35
35
36
36
readClientReply ( packet , connection ) {
37
37
// check auth here
38
- const clientHelloReply = Packets . HandshakeResponse . fromPacket ( packet ) ;
38
+ const clientHelloReply = Packets . HandshakeResponse . fromPacket ( packet , this . args . capabilityFlags ) ;
39
39
// TODO check we don't have something similar already
40
40
connection . clientHelloReply = clientHelloReply ;
41
41
if ( this . args . authCallback ) {
Original file line number Diff line number Diff line change @@ -99,11 +99,11 @@ class HandshakeResponse {
99
99
const p = this . serializeResponse ( Packet . MockBuffer ( ) ) ;
100
100
return this . serializeResponse ( Buffer . alloc ( p . offset ) ) ;
101
101
}
102
- static fromPacket ( packet ) {
102
+ static fromPacket ( packet , serverFlags ) {
103
103
const args = { } ;
104
104
args . clientFlags = packet . readInt32 ( ) ;
105
105
function isSet ( flag ) {
106
- return args . clientFlags & ClientConstants [ flag ] ;
106
+ return ( args . clientFlags & serverFlags ) & ClientConstants [ flag ] ;
107
107
}
108
108
args . maxPacketSize = packet . readInt32 ( ) ;
109
109
args . charsetNumber = packet . readInt8 ( ) ;
You can’t perform that action at this time.
0 commit comments