Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(import and export): add base64 for password when import and expor… #319

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

Rory-Z
Copy link
Member

@Rory-Z Rory-Z commented Apr 15, 2021

…t data

@Rory-Z Rory-Z force-pushed the fix/fix-error-for-export-and-import branch from 617b96e to 2aada19 Compare April 15, 2021 13:03
@Rory-Z Rory-Z force-pushed the fix/fix-error-for-export-and-import branch from 2aada19 to 373d7f7 Compare April 15, 2021 13:20
<<"password">> := Password} <- Lists ]
end.

import_auth_username(Lists) ->
case ets:info(emqx_auth_username) of
undefined -> ok;
_ ->
[ mnesia:dirty_write({emqx_auth_username, Username, Password}) || #{<<"username">> := Username,
[ mnesia:dirty_write({emqx_auth_username, Username, base64:decode(Password)}) || #{<<"username">> := Username,
<<"password">> := Password} <- Lists ]
end.

import_auth_mnesia(Auths) ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove import_auth_mnesia/1, import_acl_mnesia/1, import_schemas/1, they are enterprise code, include the export parts.

@Rory-Z Rory-Z merged commit 2461fd1 into dev/v4.0.13 Apr 16, 2021
@Rory-Z Rory-Z deleted the fix/fix-error-for-export-and-import branch April 16, 2021 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants