LP1973060: Modernize XMPP Legacy Error Code Handling user/berick/lp1970667-ubuntu-22.04-jammy
authorJason Stephenson <jason@sigio.com>
Sat, 28 May 2022 15:27:35 +0000 (11:27 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 19 Jul 2022 19:20:53 +0000 (15:20 -0400)
commit1611e2c578b0fc3da2ca164592986651e66f0c2c
treee15e18eda6811cf6d90e4ad16d86d5eadd214f2c
parent806c3667b41444870f84392b2334fb182b175ce9
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>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
src/libopensrf/transport_session.c