From 340e35909627577d10ca304ebd3362116d3aefdf Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sat, 29 Oct 2022 17:13:58 +0200 Subject: [PATCH] doh --- core/base/libs/podop/podop/dovecot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/base/libs/podop/podop/dovecot.py b/core/base/libs/podop/podop/dovecot.py index c90e188d..40b48eef 100644 --- a/core/base/libs/podop/podop/dovecot.py +++ b/core/base/libs/podop/podop/dovecot.py @@ -85,7 +85,7 @@ class DictProtocol(asyncio.Protocol): key_type, key = key.decode("utf8").split("/", 1) try: result = await self.dict.get( - key, ns=((user if user else self.user) if key_type == "priv" else None) + key, ns=((user.decode("utf8") if user else self.user) if key_type == "priv" else None) ) if type(result) is str: response = result.encode("utf8") @@ -101,7 +101,7 @@ class DictProtocol(asyncio.Protocol): """ Process a dict begin message """ self.transactions[transaction_id] = {} - self.transactions_user[transaction_id] = user if user else self.user + self.transactions_user[transaction_id] = user.decode("utf8") if user else self.user def process_set(self, transaction_id, key, value): """ Process a dict set message