Skip to content
Snippets Groups Projects
Commit 84ba7b90 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier
Browse files

fix: forward dpop token

parent 0e886359
No related branches found
No related tags found
No related merge requests found
......@@ -69,9 +69,16 @@ local function handle_request(origin, stanza, xmlns, filename, filesize, filetyp
module:log("debug", "Handing out upload slot %s to %s@%s [%d %s]",
slot_url, origin.username, origin.host, filesize, filetype);
return slot_url, slot_url, {
Authorization = origin.oauthbearer_token;
};
if string.sub(origin.oauthbearer_token, 1, string.len("DPoP")) == "DPoP" then
return slot_url, slot_url, {
Authorization = string.sub(origin.oauthbearer_token, 1, string.find(origin.oauthbearer_token, "SEPARATOR")-1);
DPoP = string.sub(origin.oauthbearer_token, string.find(origin.oauthbearer_token, "SEPARATOR")+9, -1);
};
else
return slot_url, slot_url, {
Authorization = origin.oauthbearer_token;
};
end
end
-- hooks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment