Mercurial > prosody-modules
diff mod_rest/mod_rest.lua @ 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 | 3c51eab0afe8 |
children | 5b316088bef5 |
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