crunchuser / prosody-modules

Automatically exported from code.google.com/p/prosody-modules
MIT License
0 stars 0 forks source link

mod_auth_dovecot: (0.8) authentication succeeds although Dovecot (correctly) returns "FAIL" #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install mod_auth_dovecot to auth against Dovecot 2.0
2. login using Jitsi XMPP client with any email address matching a virtualhost 
setting in Prosody and any password
3. watch login succeeding

What is the expected output? What do you see instead?
- I only want login to succeed when Dovecot returns an "OK"

What version of the product are you using? On what operating system?
- Ubuntu 12.04.2, Dovecot 2.0.19, Prosody 0.8.2, mod_auth_dovecot + lib from 
the 0.8 branch

Please provide any additional information below.
- Logfile (with debug enabled):

Aug 11 00:24:18 c2s24c9170  info    Client connected
Aug 11 00:24:18 c2s24c9170  debug   Client sent opening <stream:stream> to 
domain.com
Aug 11 00:24:18 c2s24c9170  debug   Sent reply <stream:stream> to client
Aug 11 00:24:18 c2s24c9170  debug   Received[c2s_unauthed]: <starttls 
xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
Aug 11 00:24:18 socket  debug   server.lua: we need to do tls, but delaying until 
send buffer empty
Aug 11 00:24:18 c2s24c9170  debug   TLS negotiation started for c2s_unauthed...
Aug 11 00:24:18 socket  debug   server.lua: attempting to start tls on 
tcp{client}: 0x24adb68
Aug 11 00:24:19 socket  debug   server.lua: ssl handshake done
Aug 11 00:24:19 c2s24c9170  debug   Client sent opening <stream:stream> to 
domain.com
Aug 11 00:24:19 c2s24c9170  debug   Sent reply <stream:stream> to client
Aug 11 00:24:19 c2s24c9170  debug   Received[c2s_unauthed]: <auth 
mechanism='PLAIN' xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
Aug 11 00:24:19 domain.com:auth_dovecot debug   sending 
"AUTH   3   PLAIN   service=xmpp    resp=AHhtcH.....="
Aug 11 00:24:21 domain.com:auth_dovecot debug   received 
"FAIL   3   user=xmpp@domain.com"
Aug 11 00:24:21 c2s24c9170  info    Authenticated as xmpp@domain.com
Aug 11 00:24:21 domain.com:saslauth debug   sasl reply: <success 
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'></success>

As you can see, Dovecot returns "FAIL" but the authentication succeeds anyway.

Here are my relevant settings:

anonymous_login = false
authentication = "dovecot"
dovecot_auth_socket = "/var/run/prosody/auth"    # this is created by Doveceot
auth_append_host = true

Original issue reported on code.google.com by Jens.Ben...@gmail.com on 10 Aug 2013 at 10:32