/soc/2015/jgeboski/facebook: cebf09840cbc: facebook: inform the ...

James Geboski <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: cebf09840cbc47119dcec7cf5305f236323398ab
Author:	 James Geboski <[email protected]>
Date:	 2015-08-15 18:25 -0400
Branch:	 facebook
URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/cebf09840cbc

Description:

facebook: inform the user of invalid group chat names

diffstat:

 libpurple/protocols/facebook/facebook.c |  11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diffs (25 lines):

diff --git a/libpurple/protocols/facebook/facebook.c b/libpurple/protocols/facebook/facebook.c
--- a/libpurple/protocols/facebook/facebook.c
+++ b/libpurple/protocols/facebook/facebook.c
@@ -1039,10 +1039,21 @@ fb_chat_join(PurpleConnection *gc, GHash
 	FbId tid;
 	gint id;
 	PurpleChatConversation *chat;
+	PurpleRequestCommonParameters *cpar;
 
 	name = g_hash_table_lookup(data, "name");
 	g_return_if_fail(name != NULL);
 
+	if (!FB_ID_IS_STR(name)) {
+		cpar = purple_request_cpar_from_connection(gc);
+		purple_notify_error(gc,
+		                    _("Join a Chat"),
+		                    _("Failed to Join Chat"),
+		                    _("Invalid Facebook identifier."),
+				    cpar);
+		return;
+	}
+
 	tid = FB_ID_FROM_STR(name);
 	id = fb_id_hash(&tid);
 	chat = purple_conversations_find_chat(gc, id);

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.