-
Log entry:
[2020-10-04 15:07:21:732] [WARNING ] [ in_0-message-archive ] JDBCMessageArchiveRepository.archiveMessage(): Problem adding new entry to DB: [message to="…@tigase.im/…" id="YWE4NjAyZWYtOTdkYS00YzJiLWE4OTUtNTlmMjQ5MjI2YWUzYzU1ZjI5YWRiM2E0NjFmYjMzMjI4ODk0NzEyODMwMGMzZmUwYmNkNDlhNDgxMDZmZDgzMDdkYmRlMTQ4MjdkZA==" from="morphix@xmpp.nabla.li/hertzsprung" xmlns="jabber:client"][received id="A4175F6A-E663-401F-97C7-52BC99D2730B" xmlns="urn:xmpp:receipts"/][/message]
-
The
stanza_id
field is a lot larger that UUID and this is non-typical usage of theID
. Increasing size ofstanza_id
field (which is a varchar due to requirement to index this field) should be small and 64 chars in my opinion is large enough (UUID in string is 36).I think we should return an error to the sender with type
resource-constraint
even before item would be sent to the storage. However, stored in asynchronous and message would still be delivered, which is bad. -
After discussing it in the chat: best way forward would be to store
null
in the database as the field is only used for optimisation - that way we won't loose current functionality and clients that send excessively long IDs would not be handled. Out of consideration for performance we should not increase field length.
Comments from the jdev MUC:
[2020-10-05 13:24:57] <Wojtek>: quick question - should we be concerned with lenght of the stanza id? from what I gather schema doesn't limit it... [2020-10-05 13:26:03] <pep.>: I think it's profanity that has immensely long IDs. Some kind of HMAC iirc [2020-10-05 13:26:19] <jonas’>: Wojtek, there is no specified limit beyond the limit of th eoverall stanza [2020-10-05 13:26:41] <>: I suggest to limit it to 1023 utf-8 bytes (or codepoints, if that’s easier for you) if you have to place a limit [2020-10-05 13:26:55] <>: it’s the same limit as resource and localpart have [2020-10-05 13:27:33] <Wojtek>: yeah, but that's not specified, and someone may decide well I wannna have longer IDs. would have been nice to have this in the specs IMHO [2020-10-05 13:27:48] <>: > it’s the same limit as resource and localpart have yeah, that seems reasonable [2020-10-05 13:27:52] <pep.>: Which spec? [2020-10-05 13:28:06] <>: 6120? [2020-10-05 13:28:20] <jonas’>: Wojtek, yeah, it would be nice to have a limit written down in '6120
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.2.0
|
ID:
YWE4NjAyZWYtOTdkYS00YzJiLWE4OTUtNTlmMjQ5MjI2YWUzYzU1ZjI5YWRiM2E0NjFmYjMzMjI4ODk0NzEyODMwMGMzZmUwYmNkNDlhNDgxMDZmZDgzMDdkYmRlMTQ4MjdkZA==