Changeset

5557:d7667d9ad96a

mod_rest: Include full_jid property on origin Fixes permission check in disco#info query to your own account, where the 'to' would have been stripped since it equals the account JID, leaving mod_disco passing nil, which triggers an error in module:may()
author Kim Alvefur <zash@zash.se>
date Sun, 18 Jun 2023 22:23:24 +0200
parents 5556:dfade0e38930
children 5558:3276750332ea
files mod_rest/mod_rest.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua	Sun Jun 18 15:28:23 2023 +0200
+++ b/mod_rest/mod_rest.lua	Sun Jun 18 22:23:24 2023 +0200
@@ -308,6 +308,7 @@
 			return post_errors.new("unauthz");
 		end
 		from = jid.join(origin.username, origin.host, origin.resource);
+		origin.full_jid = from;
 		origin.type = "c2s";
 		origin.log = module._log;
 	end