Comparison

plugins/mod_authz_internal.lua @ 13587:fdb2e0568cf8

mod_authz_internal: Make 'prosody:guest' default role for all unknown JIDs This fixes an issue where e.g. remote users or even other users on the server were unable to list MUC rooms. We want to define a permission to list MUC rooms, but we want it to be available to everyone by default (the traditional behaviour). prosody:guest is the lowest role we have. I ran a quick check and it isn't really used for anything right now that would be concerning. It was originally designed for anonymous logins. I think it's safe to treat remote JIDs as equivalent, since we have no trust relationship with anonymous users either.
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Jan 2025 14:41:32 +0000
parent 13541:3dc3781d02cd
child 13621:eb676b6f05e3
comparison
equal deleted inserted replaced
13586:c8a387912a33 13587:fdb2e0568cf8
16 16
17 local is_component = hosts[host].type == "component"; 17 local is_component = hosts[host].type == "component";
18 local host_user_role, server_user_role, public_user_role; 18 local host_user_role, server_user_role, public_user_role;
19 if is_component then 19 if is_component then
20 host_user_role = module:get_option_string("host_user_role", "prosody:registered"); 20 host_user_role = module:get_option_string("host_user_role", "prosody:registered");
21 server_user_role = module:get_option_string("server_user_role"); 21 server_user_role = module:get_option_string("server_user_role", "prosody:guest");
22 public_user_role = module:get_option_string("public_user_role"); 22 public_user_role = module:get_option_string("public_user_role", "prosody:guest");
23 end 23 end
24 24
25 local role_store = module:open_store("account_roles"); 25 local role_store = module:open_store("account_roles");
26 local role_map_store = module:open_store("account_roles", "map"); 26 local role_map_store = module:open_store("account_roles", "map");
27 27