After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572669 - no checking for message lenght when sending to a contact
no checking for message lenght when sending to a contact
Status: RESOLVED DUPLICATE of bug 616079
Product: empathy
Classification: Core
Component: Chat
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2009-02-21 17:37 UTC by Luka Napotnik
Modified: 2010-05-22 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Luka Napotnik 2009-02-21 17:37:05 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.
Comment 1 Guillaume Desmottes 2009-05-14 16:54:09 UTC
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.
Comment 2 Omer Akram 2010-05-22 18:40:34 UTC
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 ***