Username too long : error on inserting in oc_ojsxc_stanzas

Hi all,

I’ve a problem with javascrip xmpp client ojsxc :

i’m using registation app, so new user can register.

A new user chooses his username with 2 spaces, and the activation failed.

In my log file I have a lot of line like this :

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘INSERT INTO oc_ojsxc_stanzas (to, from, stanza) VALUES(?,?,?)’ with params [“firstname_ojsxc_esc_space_lastname_ojsxc_esc_space_-ojsxc_esc_space_ext", “”, "<iq to=&quot;firstname_ojsxc_esc_space_lastname_ojsxc_esc_space-_ojsxc_esc_space_ext&quot; type=&quot;set&quot; id=&quot;5b16ede0901b4&quot;><query xmlns=&quot;jabber:iq:roster&quot;><item jid=&quot;name.surname&quot; name=&quot;name.surname&quot; subscription=&quot;both&quot;></item></query></iq>”]: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘to’ at row 1

(i have replace the 2 usernames with alternative values with same length)

The name chosen is containing 3 spaces and 2 long words.
spaces are replaced by ‘ojsxc_esc_space’
and the max value in datatable ‘oc_ojsxc_stanzas ‘ is 64,
length with the escape character ‘ojsxc_esc_space’ is 72.

is someone else facing the same issue ?

The ojsxc application have been desactivated in order to authorize new user to register.

but each time i reactivate the application, log file is filled up with the same kind of errors.

how to repair my nextcloud instance ?


Please open an issue on

Done ->
Thanks @sualko

1 Like