79834139

Date: 2025-11-30 19:25:09
Score: 0.5
Natty:
Report link

I found the issue, earlier in the code I have added a comment, stating that the first 4 bytes of the message are the packet length and the packet number, so those must not participate in the message parsing.

const MYSQL_CLIENT_HANDSHAKE_USERNAME_START_POS = 36 // packet len + packet number + 32 bytes from the message(client caps and other fields)

Once I took this into account:

clientCaps := binary.LittleEndian.Uint32(input[4:8])

things started working properly.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Deyan Georgiev