comparison mod_block_registrations/mod_block_registrations.lua @ 5065:368bf9b06484

mod_block_registrations: Expand default list of blocked usernames (RFC 2142)
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 Oct 2022 22:51:41 +0100
parents 27aa58ed3e2e
children
comparison
equal deleted inserted replaced
5064:7d33178c79f2 5065:368bf9b06484
1 local st = require "util.stanza"; 1 local st = require "util.stanza";
2 local nodeprep = require "util.encodings".stringprep.nodeprep; 2 local nodeprep = require "util.encodings".stringprep.nodeprep;
3 3
4 local block_users = module:get_option_set("block_registrations_users", { "admin" }); 4 local block_users = module:get_option_set("block_registrations_users", {
5 "abuse", "admin", "administrator", "hostmaster", "info", "news",
6 "noc", "operator", "owner", "postmaster", "register", "registration",
7 "root", "security", "service", "signup", "support", "sysadmin",
8 "sysop", "system", "test", "trouble", "webmaster", "www", "xmpp",
9 });
5 local block_patterns = module:get_option_set("block_registrations_matching", {}); 10 local block_patterns = module:get_option_set("block_registrations_matching", {});
6 local require_pattern = module:get_option_string("block_registrations_require"); 11 local require_pattern = module:get_option_string("block_registrations_require");
7 12
8 function is_blocked(username) 13 function is_blocked(username)
9 -- Check if the username is simply blocked 14 -- Check if the username is simply blocked