comparison mod_firewall/mod_firewall.lua @ 2412:9159f9166893

mod_firewall: Use the sender bare JID instead of 'to' for stanzas to self
author Kim Alvefur <zash@zash.se>
date Sat, 03 Dec 2016 20:00:08 +0100
parents 9af2d36567a8
children 07d7036040ee
comparison
equal deleted inserted replaced
2411:e327b06b9a1b 2412:9159f9166893
88 global_code = [[local jid_split = require "util.jid".split;]]; 88 global_code = [[local jid_split = require "util.jid".split;]];
89 }; 89 };
90 jid_bare = { 90 jid_bare = {
91 global_code = [[local jid_bare = require "util.jid".bare;]]; 91 global_code = [[local jid_bare = require "util.jid".bare;]];
92 }; 92 };
93 to = { local_code = [[local to = stanza.attr.to;]] }; 93 to = { local_code = [[local to = stanza.attr.to or jid_bare(session.full_jid);]]; depends = { "jid_bare" } };
94 from = { local_code = [[local from = stanza.attr.from;]] }; 94 from = { local_code = [[local from = stanza.attr.from;]] };
95 type = { local_code = [[local type = stanza.attr.type;]] }; 95 type = { local_code = [[local type = stanza.attr.type;]] };
96 name = { local_code = [[local name = stanza.name]] }; 96 name = { local_code = [[local name = stanza.name]] };
97 split_to = { -- The stanza's split to address 97 split_to = { -- The stanza's split to address
98 depends = { "jid_split", "to" }; 98 depends = { "jid_split", "to" };