fix(emqx_mgmt_auth): better randomisation of app secrets

change from timestamp seeded hash (uuid) to crypto:strong_rand_bytes
This commit is contained in:
Zaiming (Stone) Shi 2022-04-25 11:38:28 +02:00
parent 0a16c9fabf
commit 5ecc427dce
1 changed files with 2 additions and 1 deletions

View File

@ -182,4 +182,5 @@ trans(Fun) ->
end. end.
generate_api_secret() -> generate_api_secret() ->
emqx_guid:to_base62(emqx_guid:gen()). Random = crypto:strong_rand_bytes(32),
emqx_base62:encode(Random).