[Jingle] Sends bad-request when receiving jingle action on unknown content
This commit is contained in:
parent
93e895dde1
commit
af7238f4e7
|
@ -459,8 +459,13 @@ class JingleSession(object):
|
||||||
for content in jingle.iterTags('content'):
|
for content in jingle.iterTags('content'):
|
||||||
name = content['name']
|
name = content['name']
|
||||||
creator = content['creator']
|
creator = content['creator']
|
||||||
cn = self.contents[(creator, name)]
|
if (creator, name) not in self.contents:
|
||||||
cn.on_stanza(stanza, content, error, action)
|
text = 'Content %s (created by %s) does not exist' % (name, creator)
|
||||||
|
self.__send_error(stanza, 'bad-request', text=text, type_='_modify')
|
||||||
|
raise xmpp.NodeProcessed
|
||||||
|
else:
|
||||||
|
cn = self.contents[(creator, name)]
|
||||||
|
cn.on_stanza(stanza, content, error, action)
|
||||||
|
|
||||||
def __on_session_terminate(self, stanza, jingle, error, action):
|
def __on_session_terminate(self, stanza, jingle, error, action):
|
||||||
self.connection.delete_jingle_session(self.sid)
|
self.connection.delete_jingle_session(self.sid)
|
||||||
|
|
Loading…
Reference in New Issue