2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-03 16:07:00 +00:00

Fail set_user_priv on a rejected privilege change

Every other /data call checks the status, this one discarded the
response, so an SMM that refused the user record was reported to the
caller as a successful privilege change.
This commit is contained in:
Markus Hilger
2026-07-27 15:00:11 +02:00
parent 6593863988
commit f5a90f3e35
@@ -735,9 +735,11 @@ class SMMClient(object):
username = bytes(rsp['data']).rstrip(b'\x00')
if not isinstance(username, str):
username = username.decode('utf8')
await self.webrequest(
rsp, status = await self.webrequest(
'/data', 'set=user({0},1,{1},511,,4,15,0)'.format(
uid, username))
if status != 200:
raise Exception(rsp)
async def reseat_bay(self, bay):
bay = int(bay)