GNOME Bugzilla – Bug 572669
no checking for message lenght when sending to a contact
Last modified: 2010-05-22 18:40:34 UTC
I was able to send an unreasonable large message to my other test account via MSN. In such cases, Pidgin (for example) warns the user that the message is too large to be send. I actually don't know if the message is sent or not, but empathy becomes unresponsive as it tries to look for regular expressions in the message (see libempathy-gtk/empathy-chat-textview.c:1280). The program seems to loop in the glib regex functions. To make things more interesting, I restarted empathy and just clicked on my testing MSN account, empathy again loops and becomes unresponsive in the glib regex function. This is probably because the message was logged and empathy tried to open the log for that conversation. I could fix that by simply checking the length of the "body" variable in empathy-chat-textview.c:1280 before the for loop. If it's larger then 256 bytes, the loop is skipped. I recompiled na re-run the test. Now empathy shows the message that was logged without cycling.
I see 2 bugs there: - Empathy should warn users when he try to send a so big message that the underlying protocol doesn't allow to send it. AFAIK there is not Telepathy API to know what's the max size of a message. - Empathy should probably skip the regexp if the message is longer than $FOO. Not sure how we should define $FOO.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 616079 ***