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… #320

Merged
merged 3 commits 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/add-base64-for-password branch from 88372e0 to c12717f Compare April 15, 2021 12:59
-define(VERSIONS, ["1", "3.2", "3.4", "4.0", "4.0.13", "4.1", "4.2", "4.2.10"]).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
-define(VERSIONS, ["1", "3.2", "3.4", "4.0", "4.0.13", "4.1", "4.2", "4.2.10"]).
-define(VERSIONS, ["4.0.13", "4.1", "4.2.10"]).

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

_ -> is_version_supported2(Version)
end.

is_version_supported2("4.1") ->
Copy link

@k32 k32 Apr 16, 2021

Choose a reason for hiding this comment

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

This clause can be moved inside try lists:map(...) of to reduce the number of nested conditions. But in this case the regexp must be relaxed

is_version_supported2("4.1") ->
true;
is_version_supported2(Version) ->
case re:run(Version, "^4.[02].\\d+$", [{capture, none}]) of
Copy link

Choose a reason for hiding this comment

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

Perhaps the regexp could be simplified to just "^(\\d+\\.){2}\\d+$", so it only checks format of the version, but not the version itself.

@Rory-Z Rory-Z merged commit ed3d2ca into master Apr 16, 2021
@Rory-Z Rory-Z deleted the fix/add-base64-for-password branch April 16, 2021 11:22
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

6 participants