ejabberd - Comments for "Authenticate Against PAM with Python in ejabberd 1.x" https://www.ejabberd.im/ejabberd_pam_authentication en When sending offline https://www.ejabberd.im/ejabberd_pam_authentication#comment-34569 <p>When sending offline messages , users can no longer login and it hangs while trying to connect...</p> Mon, 30 Jul 2007 17:08:44 +0000 Anonymous comment 34569 at https://www.ejabberd.im Re: The script is broken https://www.ejabberd.im/ejabberd_pam_authentication#comment-29652 <p>If you're using python 2.4, you can test for the command first using</p> <p> (operation,moredata)=data.split(':',1)</p> <p>then in the check for auth<br /> (user,host,password)=moredata.split(':')</p> <p>and in the check for isuser<br /> (user,host) = moredata.spllit(':')</p> <p>Note: code is not tested.</p> Fri, 20 Jul 2007 14:50:44 +0000 MC comment 29652 at https://www.ejabberd.im This script is broken https://www.ejabberd.im/ejabberd_pam_authentication#comment-2839 <p>This script is broken at line 99:<br /> <div class="quote-msg"> <div class="quote-author"><em>ejabberd_pam_authentication.py</em> wrote:</div> <p>(operation, user, host, password) = data.split(':')</p></div> </p><p>The problem is that we do not know at this point if the operation is going to be auth or isuser. In the auth case, this is correct, but in the isuser case this will throw an exception that will confuse epmd and break authentication until a restart. The way to test this is simple: send a message to an offline user while this extauth is loaded, and you will expose this bug.</p> <p>In my own heavily hacked-up offshoot of this script, I used an ugly try/except block to split on only operation,user,host if the above fails. Probably the best way is to split into a list, check list[0] for the operation, and give names only once you're inside the if/else block checking operation.</p> Wed, 10 Jan 2007 22:00:15 +0000 SpaceHobo comment 2839 at https://www.ejabberd.im