jsxc / xmpp-cloud-auth

:key: Authentication hub for Nextcloud+JSXC→Prosody, ejabberd, saslauthd, Postfix
https://www.jsxc.org
MIT License
60 stars 18 forks source link

Prosody authentication: "Unable to interpret data from auth process, [xx bytes]" #21

Closed MarcelWaldvogel closed 7 years ago

MarcelWaldvogel commented 7 years ago

This was experienced by @Carpintonto on Ubuntu 16.04.2 LTS:

Prosody log /var/log/prosody/prosody.log shows messages akin to:

example.com:auth_external warn Unable to interpret data from auth process, [41 bytes]
MarcelWaldvogel commented 7 years ago

Playing around with mod_auth_external.lua (printing those bytes), it seems to be a verbatim echo of the auth request sent to external_cloud.py. Why this is happening, is currently beyond me, as mod_auth_external.lua sets no_local_echo = true and also the python end sees echo turned off.

(Note that mod_auth_external.lua uses a TTY/PTY pair to start the authentication process, which is unnecessary in this case (and most other cases I can currently think of).

MarcelWaldvogel commented 7 years ago

Prosody issue 855 discusses this problem. The patch fixes it, for non-blocking access (this shouldn't bother you, unless you are using Prosody-trunk).