Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 1757:157e438823ba
MUC: Fixed traceback on unauthorized access of the room configuration form.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 07 Sep 2009 20:55:57 +0500 |
parent | 1756:b2291156a9c2 |
child | 1764:c00d4ba8d2f3 |
comparison
equal
deleted
inserted
replaced
1756:b2291156a9c2 | 1757:157e438823ba |
---|---|
311 end | 311 end |
312 end | 312 end |
313 end | 313 end |
314 | 314 |
315 function room_mt:handle_form(origin, stanza) | 315 function room_mt:handle_form(origin, stanza) |
316 if self:get_affiliation(stanza.attr.from) ~= "owner" then origin.send(st.error_reply(nil, "auth", "forbidden")); return; end | 316 if self:get_affiliation(stanza.attr.from) ~= "owner" then origin.send(st.error_reply(stanza, "auth", "forbidden")); return; end |
317 if stanza.attr.type == "get" then | 317 if stanza.attr.type == "get" then |
318 local title = "Configuration for "..self.jid; | 318 local title = "Configuration for "..self.jid; |
319 origin.send(st.reply(stanza):query("http://jabber.org/protocol/muc#owner") | 319 origin.send(st.reply(stanza):query("http://jabber.org/protocol/muc#owner") |
320 :tag("x", {xmlns='jabber:x:data', type='form'}) | 320 :tag("x", {xmlns='jabber:x:data', type='form'}) |
321 :tag("title"):text(title):up() | 321 :tag("title"):text(title):up() |