Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
all
-
All
Description
The last zero byte should not be included in the salt when re-calculating the scramble responding to auth switch request.
Check attached before.png (current code, 0x00 included) and after.png (after fix, 0x00 excluded).
I have created a PR to fix this, please help to verify and review.
https://github.com/MariaDB/mariadb-connector-j/pull/93
I agree that implementation doesn't correspond to documentation.
Each authentication data remove this additional byte afterward.
Better to remove it when setting the data variable, like documentation https://mariadb.com/kb/en/mariadb/1-connecting-connecting/#authentication-switch-request describe it.
(https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchRequest is wrong describing this as string[EOF])