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
Conversation
88372e0
to
c12717f
Compare
include/emqx_mgmt.hrl
Outdated
-define(VERSIONS, ["1", "3.2", "3.4", "4.0", "4.0.13", "4.1", "4.2", "4.2.10"]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-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"]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
src/emqx_mgmt.erl
Outdated
_ -> is_version_supported2(Version) | ||
end. | ||
|
||
is_version_supported2("4.1") -> |
There was a problem hiding this comment.
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
src/emqx_mgmt.erl
Outdated
is_version_supported2("4.1") -> | ||
true; | ||
is_version_supported2(Version) -> | ||
case re:run(Version, "^4.[02].\\d+$", [{capture, none}]) of |
There was a problem hiding this comment.
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.
…t data