about summary refs log tree commit diff
path: root/test/python/server_test_case.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-10-07 08:17:33 +0000
committerPjotr <wrk@bosa.lan>2026-10-07 08:17:33 +0000
commit89c881605a5c94be75f27c2c82cb04cf8bb3b9a8 (patch)
tree18364d588200c7b495f1d0706f33c01511cc3b78 /test/python/server_test_case.py
parent7631cf515ffe1a81424aa53ab7052a61a3ff2b4d (diff)
downloadgenenetwork4-89c881605a5c94be75f27c2c82cb04cf8bb3b9a8.tar.gz
* test/python/server_test_case.py (_read_scramble): skip the packet header.
_read_packet returns the 4-byte header plus body, but _read_scramble
parsed from offset 1 as if the header were absent. It matched a zero
byte in the header instead of the one ending the server version
string, so the scramble was garbage, the mysql_native_password login
was always denied, and database_reachable() returned False on every
server, skipping the DB-gated tests. Start at offset 5.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'test/python/server_test_case.py')
-rw-r--r--test/python/server_test_case.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/python/server_test_case.py b/test/python/server_test_case.py
index d4bb330..be2dcf9 100644
--- a/test/python/server_test_case.py
+++ b/test/python/server_test_case.py
@@ -73,7 +73,7 @@ def _read_exact(sock, count):
 
 def _read_scramble(handshake):
     """Extract the 20-byte auth plugin data from the server handshake."""
-    pos = 1  # protocol version
+    pos = 5  # 4-byte packet header, then protocol version
     pos = handshake.index(b"\0", pos) + 1  # server version string
     pos += 4  # connection id
     scramble = handshake[pos : pos + 8]