Software /
code /
prosody-modules
Changeset
4727:e6f46d1b3337
mod_rest: Set type on temp session to satisfy certain auth checks
E.g. mod_external_services and some others use `origin.type == "c2s"` as
access check, which rejected the previous nil value.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Oct 2021 18:07:35 +0200 |
parents | 4726:611bc06c4160 |
children | 4728:1c6d353550cc |
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 Tue Oct 26 17:52:15 2021 +0200 +++ b/mod_rest/mod_rest.lua Tue Oct 26 18:07:35 2021 +0200 @@ -242,6 +242,7 @@ return post_errors.new("unauthz"); end from = jid.join(origin.username, origin.host, origin.resource); + origin.type = "c2s"; end local payload, err = parse_request(request, path); if not payload then