Commit 8437643
MDEV-38431: fix database pointer calculation for long passwords
When a client connects with CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
capability and a password >= 251 bytes, the server incorrectly
calculates the database name pointer.
For passwords >= 251 bytes, LENENC uses a 3-byte prefix (0xFC + 2 bytes),
but the old code assumed a 1-byte prefix. Fix by using the passwd pointer
which has already been advanced past the length prefix by
safe_net_field_length_ll().
Also fix db pointer calculation for old protocol (!CLIENT_SECURE_CONNECTION)
where the password is null-terminated and needs +1 to skip the terminator.1 parent 52a2b72 commit 8437643
File tree
3 files changed
+108
-8
lines changed- mysql-test/suite/plugins
- r
- t
- sql
3 files changed
+108
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13846 | 13846 | | |
13847 | 13847 | | |
13848 | 13848 | | |
13849 | | - | |
13850 | 13849 | | |
13851 | 13850 | | |
13852 | 13851 | | |
13853 | | - | |
| 13852 | + | |
| 13853 | + | |
| 13854 | + | |
| 13855 | + | |
| 13856 | + | |
13854 | 13857 | | |
13855 | | - | |
| 13858 | + | |
| 13859 | + | |
| 13860 | + | |
| 13861 | + | |
| 13862 | + | |
13856 | 13863 | | |
13857 | 13864 | | |
13858 | | - | |
| 13865 | + | |
13859 | 13866 | | |
13860 | 13867 | | |
13861 | 13868 | | |
| 13869 | + | |
| 13870 | + | |
| 13871 | + | |
13862 | 13872 | | |
13863 | 13873 | | |
13864 | | - | |
13865 | | - | |
13866 | | - | |
13867 | | - | |
13868 | 13874 | | |
13869 | 13875 | | |
13870 | 13876 | | |
| |||
0 commit comments