• Davi Arnaut's avatar
    Bug#12563279: REGRESSION IN HANDLING PRE-4.1 AUTHENTICATION PACKET · c20552e1
    Davi Arnaut authored
    The problem is that clients implementing the 4.0 version of the
    protocol (that is, mysql-4.0) do not null terminate a string
    at the end of the authentication packet. These clients denote
    the end of the string with the end of the packet.
    
    Although this goes against the documented (see MySQL Internals
    ClientServer Protocol wiki) description of the protocol, these
    old clients still need to be supported.
    
    The solution is to support the documented and actual behavior
    of the clients. If a client is using the pre-4.1 version of
    the protocol, the end of a string in the authentication packet
    can either be denoted with a null character or by the end of
    the packet. This restores backwards compatibility with old
    clients implementing either the documented or actual behavior.
    c20552e1
password.c 17.4 KB