I think this is a bug...

Brad Fitzpatrick brad at danga.com
Fri Mar 9 01:18:10 UTC 2007


I'm not sure about this patch.

When I look at that sub,

IQ.pm....
sub on_recv_from_client {
    my ($self, $conn) = @_;

    my $to = $self->to_jid;
    if (! $to || $conn->vhost->uses_jid($to)) {
        $self->process($conn);
        return;
    }

    $self->deliver;
}


That seems to say, if there's no 'to' attribute, it's obviously intended
for the server, not another user.  But if the 'to' is there, and the vhost
uses that JID to represent itself (as opposed to handles_jid, which means
the vhost's domain is the same as the 'to' domain... like the vhost for
livejournal.com 'handles' brad at livejournal.com), then that means the same
thing as no 'to' attribute, and the server should process it.

What IQ packet XML are you seeing that's spinning the server?



On Mon, 26 Feb 2007, Pedro Melo wrote:

> Hi,
>
> I'm not sure but I think this is a bug. WIth the current code, the
> server goes into a loop.
>
> Basically the code in IQ.pm for on_recv_from_client() fails to
> recognize local at domain as a valid "to the server" IQ. I think the bug
> is that it should be calling
>
> $conn->vhost->handles_jid($to)
>
> and not
>
> $conn->vhost->uses_jid($to)
>
> at line 14.
>
> Attached patch switches to handles_jid.
>
>


More information about the Djabberd mailing list