mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
fix HMAC for external_secret
This commit is contained in:
parent
b2b29269ec
commit
fbdcc44fd9
@ -688,7 +688,7 @@ make_query_string(Slot, Size, #state{external_secret = Key}) when Key /= <<>> ->
|
||||
UrlPath = str:join(Slot, <<$/>>),
|
||||
SizeStr = integer_to_binary(Size),
|
||||
Data = <<UrlPath/binary, " ", SizeStr/binary>>,
|
||||
HMAC = str:to_hexlist(crypto:hmac(sha256, Data, Key)),
|
||||
HMAC = str:to_hexlist(crypto:hmac(sha256, Key, Data)),
|
||||
<<"?v=", HMAC/binary>>;
|
||||
make_query_string(_Slot, _Size, _State) ->
|
||||
<<>>.
|
||||
|
Loading…
Reference in New Issue
Block a user