Merge pull request #7760 from zmstone/0425-5.0-improve-app-secret-randmisation

fix(emqx_mgmt_auth): better randomisation of app secrets
This commit is contained in:
Zaiming (Stone) Shi 2022-04-26 11:37:35 +01:00 committed by GitHub
commit bf3acaaaee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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