Skip to content

Conversation

@ramnes
Copy link
Contributor

@ramnes ramnes commented Dec 19, 2025

Some MySQL clients (e.g. libmysql) send a single null byte to indicate an empty password, while others (e.g. mariadb) send an empty packet. This matches MySQL server's own handling:

if (!pkt_len || (pkt_len == 1 && *pkt == 0))

(Source: https://github.com/mysql/mysql-server/blob/8.0/sql/auth/sha2_password.cc)

@ramnes ramnes force-pushed the ramnes/0x00 branch 4 times, most recently from 617c990 to d089c65 Compare December 19, 2025 22:41
@ramnes ramnes force-pushed the ramnes/0x00 branch 2 times, most recently from 6c6385a to 45651f0 Compare December 22, 2025 13:32
Some MySQL clients (e.g. libmysql) send a single null byte to indicate an empty password, while others (e.g. mariadb) send an empty packet. This matches MySQL server's own handling:

```c
if (!pkt_len || (pkt_len == 1 && *pkt == 0))
```

(Source: https://github.com/mysql/mysql-server/blob/8.0/sql/auth/sha2_password.cc)
@lance6716 lance6716 merged commit a07c974 into go-mysql-org:master Dec 23, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants