Skip to content

Commit

Permalink
Fix a bug in CHANGE_USER and chains of ProxySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Oct 31, 2018
1 parent 973c699 commit 0934723
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/MySQL_Protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,9 +1232,8 @@ bool MySQL_Protocol::process_pkt_auth_swich_response(unsigned char *pkt, unsigne


bool MySQL_Protocol::process_pkt_COM_CHANGE_USER(unsigned char *pkt, unsigned int len) {
// FIXME: very buggy function, it doesn't perform any real check
bool ret=false;
int cur=sizeof(mysql_hdr);
int cur=sizeof(mysql_hdr);
unsigned char *user=NULL;
char *password=NULL;
char *db=NULL;
Expand Down Expand Up @@ -1321,7 +1320,7 @@ bool MySQL_Protocol::process_pkt_COM_CHANGE_USER(unsigned char *pkt, unsigned in
free(sha1_pass);
sha1_pass=NULL;
}

userinfo->set(NULL,NULL,NULL,NULL); // just to call compute_hash()
return ret;
}

Expand Down

0 comments on commit 0934723

Please sign in to comment.