LP1973060: Modernize XMPP Legacy Error Code Handling user/dyrcona/lp1973060-modernize-xmpp
authorJason Stephenson <jason@sigio.com>
Sat, 28 May 2022 15:27:35 +0000 (11:27 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 31 May 2022 14:47:14 +0000 (10:47 -0400)
commitaf284ad0e9e77d3148bb24d7fbdd8eaeb7531458
tree3f88e2b349124593619648445bbb94811f6d626b
parent9fa5fbbd05d2ade6a6359c16ff6056561fbeca51
LP1973060: Modernize XMPP Legacy Error Code Handling

Processone removed the setting of the legacy XMPP error code from the
Erlang XMPP package with release 1.5.6 in November 2021.  Using
OpenSRF with any version of Ejabberd released since the 1.5.6 XMPP
package will cause OpenSRF processes to segfault when a XMPP error
message is processed.  This was specifically noticed with Ejabberd
21.12 on Ubuntu 22.04.

To verify the bug, you may install OpenSRF on any system running
Ejabberd 21.12 (or any later version) and make a request to a
non-existent service.  The following srfsh request should suffice to
cause a segfault:

request math add 2,2

NOTE: The request is to the non-existent "math" service.

After applying this patch, instead of a segfault in srfsh, you should
see an error message.

OpenSRF should continue to function normally with earlier releases of
the Erlang XMPP library and Ejabberd.

Signed-off-by: Jason Stephenson <jason@sigio.com>
src/libopensrf/transport_session.c