jingle/check.c
changeset 21 147f131382dd
parent 20 72e53665328e
child 25 11694a99f84b
--- a/jingle/check.c	Sun Jun 13 02:25:51 2010 +0200
+++ b/jingle/check.c	Wed Jun 16 20:16:45 2010 +0200
@@ -20,8 +20,11 @@
  */
 
 #include <glib.h>
+
 #include <loudmouth/loudmouth.h>
 
+#include <mcabber/utils.h>
+
 #include <jingle/check.h>
 #include <jingle/jingle.h>
 
@@ -66,6 +69,12 @@
     return FALSE;
   }
 
+  if (!check_jid_syntax(jn->initiator)) {
+    g_set_error(err, JINGLE_CHECK_ERROR, JINGLE_CHECK_ERROR_BADVALUE,
+                "the initiator attribute in invalid (not a jid)");
+    return FALSE;
+  }
+
   jn->action = jingle_action_from_str(actionstr);
   if (jn->action == JINGLE_UNKNOWN_ACTION) {
     g_set_error(err, JINGLE_CHECK_ERROR, JINGLE_CHECK_ERROR_BADVALUE,