mysqli::real_connect(): Authentication data too long. Won't fit into the buffer and will be truncated. Authentication will thus fail
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
I'm using JWT tokens as passwords for MariaDB (via PAM auth) and while using phpmyadmin 5.2.1 I see this message pop up. However, even though the message appears authentication does succeed.
It looks like mysqlnd_wireprotocol.c will set this message if (packet->auth_data_len > 0xFF)
Passwords can actually be extremely long though.
PHP Version
PHP 8.1.15
Operating System
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The warning is emitted in mysqlnd_wireprotocol.c when packet->auth_data_len exceeds 0xFF. Start there and trace how authentication data length is encoded and handled for MariaDB/PAM credentials. Done means the behavior and warning accurately reflect authentication with long credentials, with coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, mariadb, php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100