Commit Graph

5 Commits

Author SHA1 Message Date
b4df7ca4dc test: make all the tests run in serial (#30692) 2021-12-14 18:06:36 +08:00
11b61738f3 parser: migrate test-infra to testify (#29191) 2021-10-28 12:30:49 +08:00
c95be4aaa6 [parser] auth: caching_sha2_password salt fix (#1249)
- a NUL or '$' could get replaced with another NUL or '$'
- Replacement characters didn't get their first bit set to 0 (`&^ 128`)
- The test case used the index number instead of the value of the rune.
2021-10-09 14:53:23 +08:00
768ee171c1 [parser] auth: Fix salt generation of caching_sha2_password (#1242)
This code intended to set the first bit of every byte of the salt
to 0 as the salt should not contain multi-byte UTF-8.

However it failed to do this. This changes the `^` with a `^&` to fix
that.

In addition to that this also avoids the '$' inside salts as that is
already used as delimiter in the authentication string.

Co-authored-by: tiancaiamao <tiancaiamao@gmail.com>
2021-10-09 14:53:23 +08:00
8d23ad21c9 [parser] auth: add the caching sha2 algorithm for authentication (#1232)
This allows validating passwords against the `authentication_string`
data that MySQL stores for caching_sha2 passwords.

Related:
- https://github.com/pingcap/tidb/issues/9411
2021-10-09 14:53:23 +08:00