fix(GOV-012): 拒绝 MariaDB 伪装版本

This commit is contained in:
2026-08-18 01:44:25 +08:00
parent 06466f388e
commit 8e954a3f5f
3 changed files with 14 additions and 2 deletions
@@ -48,7 +48,12 @@ test('只接受 MySQL 5.7.x 与固定字符规则', () => {
databaseCollation: 'utf8mb4_general_ci',
};
assert.doesNotThrow(() => assertMysql57ServerMetadata(valid));
for (const serverVersion of ['5.6.51', '8.0.40', '10.6.18-MariaDB']) {
for (const serverVersion of [
'5.6.51',
'8.0.40',
'5.7.42-MariaDB',
'10.6.18-MariaDB',
]) {
assert.throws(() => assertMysql57ServerMetadata({ ...valid, serverVersion }));
}
});