#1011449 pidgin cannot resume interrupted XMPP connection if no srv_rec available.

Package:
pidgin
Source:
pidgin
Description:
graphical multi-protocol instant messaging client
Submitter:
Mad Horse
Date:
2022-06-10 23:30:03 UTC
Severity:
normal
#1011449#5
Date:
2022-05-23 08:00:00 UTC
From:
To:
Dear Maintainer,

The current pidgin cannot resume interrupted XMPP connection if no srv_rec
available (e.g. when using tor as proxy so no srv_rec will be obtained
from DNS
in the first place).

This is because in jabber_login_callback(), when an error occurs (source
< 0),
if (js->srv_rec != NULL), it will report the error and call
try_srv_connect()
to try another SRV record, and return, but if (js->srv_rec == NULL), it will
return directly without reporting the error, nor any further process.

Since try_srv_connect() can handle the scenario that (js->srv_rec ==
NULL) and
resume the interrupted XMPP connection, I suggest to call try_srv_connect()
when an error occurs, regardless whether (js->srv_rec == NULL), like the
attached patch.

#1011449#10
Date:
2022-05-23 08:26:15 UTC
From:
To:
This issue should occur when jabber_login_connect() fails and calls
jabber_login_callback() with an error.

在 2022/5/23 16:00, Mad Horse 写道:

It makes things worse that because now the state of affected connection
is not

PURPLE_DISCONNECTED, further calls of _purple_connection_new() will return

early, making the connection unable to resume. The only way to connect the

corresponding account is to disable it first, (set its state to

PURPLE_DISCONNECTED) and enable it again, manually.

#1011449#15
Date:
2022-05-23 08:56:42 UTC
From:
To:
The temporary walkaround could be using "old-ssl" or bosh on XMPP accounts,

because their early error-handlings avoid (js->srv_rec).

#1011449#20
Date:
2022-05-23 14:20:02 UTC
From:
To:
There is already a fix (
https://keep.imfreedom.org/pidgin/pidgin/rev/ea52fcc50e50 ) on pidgin's
repository, although the approach is different.

#1011449#25
Date:
2022-06-10 06:05:05 UTC
From:
To:
This bug should have been fixed in pidgin 2.14.10-1 since it should
contain https://keep.imfreedom.org/pidgin/pidgin/rev/ea52fcc50e50 , as
shown in https://keep.imfreedom.org/pidgin/pidgin/graph/594d72369304 .

#1011449#30
Date:
2022-06-10 23:17:26 UTC
From:
To:
Marking as fixed per last comment.