altdesktop / python-dbus-next

🚌 The next great DBus library for Python with asyncio support
https://python-dbus-next.readthedocs.io/en/latest/
MIT License
191 stars 60 forks source link

AuthAnnonymous: add SASL compliance #121

Open leiflm opened 2 years ago

leiflm commented 2 years ago

The dbus specification states that its authentication mechanism is a SASL profile.

Unless (empty) data is provided with the mechanism right away (i.e. AUTH ANONYMOUS), SASL compliant authentication responds with a DATA message. While some dbus implementations do not do this, the sd-bus does as of systemd >=v242-rc1 [0].

This fixes the response in a backward compatible way by sending back an empty DATA message.

[0] https://github.com/systemd/systemd/commit/2010873b4b49b223e0cc07d28205b09c693ef005