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>