some problem with djabberd and ssl

Vladimir Lettiev thecrux at gmail.com
Tue May 12 06:15:22 UTC 2009


Yeah, this patch fixed the problem! Thank you, Eugene.

(CC: DJabberd List)

2009/5/11 Eugene Mamaev [emamaev at gmail dot com]:
> Hello Vladimir,
>
> Thursday, May 7, 2009, 11:12:23 AM, you wrote:
>
>> 2009/5/7 Eugene Mamaev [emamaev at gmail dot com]:
>>> I was trying to subscribe to their list several times but it seems
>>> does not work. I did not get list digest on my email. I found your
>>> note in djd list from google. I have a guess that the problem persists
>>> if roster contains non ASCII chars. How to write to their list?
>
>> Did you try to send mail to djabberd at lists.danga.com ?
>
>> There was some problem, but it fixed now:
>> http://lists.danga.com/pipermail/djabberd/2009-March/000709.html
>
> Message is awaiting of moderator approval from may 7. Below is my fix,
> please check if this helps to you.
>
> Index: StartTLS.pm
> ===================================================================
> --- StartTLS.pm
> +++ StartTLS.pm
> @@ -2,6 +2,7 @@
>  use strict;
>  use base qw(DJabberd::Stanza);
>  use Net::SSLeay;
> +use Encode qw(is_utf8 encode_utf8);
>
>  Net::SSLeay::load_error_strings();
>  Net::SSLeay::SSLeay_add_ssl_algorithms();
> @@ -84,6 +85,10 @@
>         # NO LONGER RELEVANT?
>         # $to_write = 4096 if $to_write > 4096;
>
> +        if (is_utf8($$bref) && length($$bref) != $to_write) {
> +            $$bref = encode_utf8($$bref);
> +        }
> +
>         my $str = substr($$bref, $offset, $to_write);
>         my $written = Net::SSLeay::write($ssl, $str);
>
>
>
> --
> Best regards,
>  Eugene                            mailto:emamaev at gmail dot com
>
>


-- 
Vladimir Lettiev aka crux <theCrux at gmail.com>


More information about the Djabberd mailing list