1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-30 21:12:05 +00:00

Merge pull request #1882 from Kozea/fix-1878

Fix 1878
This commit is contained in:
Peter Bieringer 2025-09-24 06:43:57 +02:00 committed by GitHub
commit ab88b0cfb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# Changelog
## 3.5.7.dev
* Extend: [auth] dovecot: add support for version >= 2.4
## 3.5.6
* Fix: broken start when UID does not exist (potential container startup case)

View file

@ -92,6 +92,7 @@ class Auth(auth.BaseAuth):
# Hence, we try to read just once with a buffer big
# enough to hold all of it.
buf = sock.recv(1024)
version_sent = False
while b'\n' in buf and not done:
line, buf = buf.split(b'\n', 1)
parts = line.split(b'\t')
@ -114,6 +115,10 @@ class Auth(auth.BaseAuth):
)
return ""
seen_part[0] += 1
if int(version[1]) >= 3:
sock.send(b'VERSION\t1\t1\n')
buf += sock.recv(1024)
version_sent = True
elif first == b'MECH':
supported_mechs.append(parts[0])
seen_part[1] += 1
@ -144,6 +149,7 @@ class Auth(auth.BaseAuth):
# Handshake
logger.debug("Sending auth handshake")
if not version_sent:
sock.send(b'VERSION\t1\t1\n')
sock.send(b'CPID\t%u\n' % os.getpid())