[ejabberd] user can't login special characters

Alexandre LISSY alexandrelissy at free.fr
Sun May 18 15:32:11 MSD 2008


Le dimanche 18 mai 2008, kaan kaan a écrit :
> HI guys,
>
> my problem is, when user have special characters in their password, then
> they can't login. I use external authentication with mysql, it's the same
> password which they use on my site. i use the php authentification script
> from the website:
> http://www.ejabberd.im/check_mysql_php
>
> in the logs i get this
>
> =INFO REPORT==== 2008-05-18 13:20:01 ===D(<0.525.0>:ejabberd_c2s:1345) :
> Send XML on stream = "<iq type='error' from='chat.blabla.eu'
> id='sd4'><query
> xmlns='jabber:iq:auth'><username>test</username><resource>Pandion</resource
>><password>test54ö</password></query><error code='401'
> type='auth'><not-authorized
> xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>"
>
> after test54 its a ö
>
> can somebody help me plz?
>
> greets
> _________________________________________________________________
> Es ist höchste Zeit dabei zu sein - Holen Sie sich jetzt die neue
> Generation der Windows Live Services! http://get.live.com/

I found it :

Replace your readstdin() with this one, it'll force conversion :

        function readstdin()
        {
                $l      = @fgets($this->stdin, 3); // We take the length of 
string
                $length = @unpack("n", $l); // ejabberd give us something to 
play with ...
                $len    = $length["1"]; // and we now know how long to read.
                if($len > 0) { // if not, we'll fill logfile ... and disk full 
is just funny once
                        $this->logg("Reading $len bytes ... "); // We 
notice ...
                        $data   = @fgets($this->stdin, $len+1);
                        $data = iconv("UTF-8", "ISO-8859-15", $data); // To be 
tested, not sure if still needed.
                        $this->data = $data; // We set what we got.
                        $this->logg("IN: ".$data);
                }
        }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.jabber.ru/pipermail/ejabberd/attachments/20080518/33b900de/attachment.pgp 


More information about the ejabberd mailing list