dbusjs / node-dbus-next

🚌 The next great dbus library for node
https://www.npmjs.com/package/dbus-next
155 stars 52 forks source link

DBUS_COOKIE_SHA1 auth does not work at all #124

Open bspot opened 1 year ago

bspot commented 1 year ago

DBUS_COOKIE_SHA1 authentication will always fail, because the reply message to the server challenge is missing a space ( ) between the client challenge and the response in https://github.com/dbusjs/node-dbus-next/blob/6b8f447ff85f8cfe3f5da307b7041085e9fec2cc/lib/handshake.js#L145

Relevant part of the spec: https://dbus.freedesktop.org/doc/dbus-specification.html#text:It%20concatenates%20the%20client's%20challenge%20string,%20a%20space%20character,%20and%20the%20SHA-1%20hex%20diges:~:text=It%20concatenates%20the%20client%27s%20challenge%20string%2C%20a%20space%20character%2C%20and%20the%20SHA%2D1%20hex%20digest