What is the max length of a message?
Added about 1 year ago
here in the company we're developing a chat application and one of our requirements is to limit the size of a message to a certain amount of characters.
We're wondering if Tigase Server & Tigase Message Archiving have a limit of message length they can handle. We're using SQL Server and both latests Tigase/MA by the way.
Thanks in advance,
Added by Artur Hefczyc about 1 year ago
There is currently no limit on the message size. There are however, several limits on the Stanza which is sent through the server. They all can be adjusted. One of them limits number of characters sent as CData within any XML element. So this could be, in theory used as the message size limit. It is currently set to 1,048,576 characters, however, you have to remember that if you change it, it will affect all XML data sent through the server not just messages.
We could add some message limiting logic but then, there is a question, what should happen if the limit is exceeded? Cut the message, reject the message, disconnect user?
Added by Mauricio Giacomello about 1 year ago
Right. Got the point! We'll go ahead and set a limit only in the front-end side, unfortunately.
Thanks for the quick response,
Added by Igor Khomenko 10 months ago
It would be greate if it will be possible to limit message.body CDATA because it's kind of the most popular case how people can spam server.
if the limit is exceeded then a reject message can be sent back
Added by Wojciech Kapcia 10 months ago
Igor, we are currently working on smarter SPAM filters so I'm not sure that this particular feature will be needed.
Added by Igor Khomenko 20 days ago
could you please provide more details here regarding SPAM component with doc links? will it be released as a part of Tigase 7.2 ?
Added by Wojciech Kapcia 20 days ago
There won't be tigase 7.2 - we will release this codebase as Tigase XMPP Server 8.0.0 and anti-spam functionality is already included in the nightly binaries. You can check it's documentation here: http://docs.tigase.org/tigase-spam/snapshot/Tigase_SPAM_Guide/html/
Added by Igor Khomenko 18 days ago
There are however, several limits on the Stanza which is sent through the server. They all can be adjusted. One of them limits number of characters sent as CData within any XML element.
could you please assist which config parameter is used for this
I found this page which says "These values may be changed." but does not provide any guides how to do it
Added by Igor Khomenko 10 days ago
Thanks Wojciech, good to know
One more questions - from my understanding we are still able to 'hack' a server, for example by sending too big single element, e.g message.body.
We can limit --elements-number-limit to 1 but still can send too big CDATA of a single element
Is there a way to limit CDATA ?