some problem with djabberd and ssl

Brad Fitzpatrick brad at danga.com
Mon May 18 00:27:23 UTC 2009


That seems like a bad patch.  You're modifying the caller's buffer!  You
really just want to modify the buffer that you write out to the socket.
On Mon, May 11, 2009 at 11:15 PM, Vladimir Lettiev <thecrux at gmail.com>wrote:

> 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/djabberd/attachments/20090517/3f8e7c83/attachment.htm 


More information about the Djabberd mailing list