Merge pull request #10741 from paulozulato/fix-oracle-passwd-leaking
fix(oracle): hide password on stacktrace
This commit is contained in:
commit
50ff6c4aa4
|
@ -1,7 +1,7 @@
|
||||||
%% -*- mode: erlang; -*-
|
%% -*- mode: erlang; -*-
|
||||||
|
|
||||||
{erl_opts, [debug_info]}.
|
{erl_opts, [debug_info]}.
|
||||||
{deps, [ {jamdb_oracle, {git, "https://github.com/emqx/jamdb_oracle", {tag, "0.4.9.4"}}}
|
{deps, [ {jamdb_oracle, {git, "https://github.com/emqx/jamdb_oracle", {tag, "0.4.9.5"}}}
|
||||||
, {emqx_connector, {path, "../../apps/emqx_connector"}}
|
, {emqx_connector, {path, "../../apps/emqx_connector"}}
|
||||||
, {emqx_resource, {path, "../../apps/emqx_resource"}}
|
, {emqx_resource, {path, "../../apps/emqx_resource"}}
|
||||||
]}.
|
]}.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_oracle, [
|
{application, emqx_oracle, [
|
||||||
{description, "EMQX Enterprise Oracle Database Connector"},
|
{description, "EMQX Enterprise Oracle Database Connector"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [
|
{applications, [
|
||||||
kernel,
|
kernel,
|
||||||
|
|
|
@ -96,7 +96,7 @@ on_start(
|
||||||
{host, Host},
|
{host, Host},
|
||||||
{port, Port},
|
{port, Port},
|
||||||
{user, emqx_plugin_libs_rule:str(User)},
|
{user, emqx_plugin_libs_rule:str(User)},
|
||||||
{password, emqx_secret:wrap(maps:get(password, Config, ""))},
|
{password, jamdb_secret:wrap(maps:get(password, Config, ""))},
|
||||||
{sid, emqx_plugin_libs_rule:str(Sid)},
|
{sid, emqx_plugin_libs_rule:str(Sid)},
|
||||||
{service_name, emqx_plugin_libs_rule:str(ServiceName)},
|
{service_name, emqx_plugin_libs_rule:str(ServiceName)},
|
||||||
{database, DB},
|
{database, DB},
|
||||||
|
@ -258,9 +258,7 @@ oracle_host_options() ->
|
||||||
?ORACLE_HOST_OPTIONS.
|
?ORACLE_HOST_OPTIONS.
|
||||||
|
|
||||||
connect(Opts) ->
|
connect(Opts) ->
|
||||||
Password = emqx_secret:unwrap(proplists:get_value(password, Opts)),
|
jamdb_oracle:start_link(Opts).
|
||||||
NewOpts = lists:keyreplace(password, 1, Opts, {password, Password}),
|
|
||||||
jamdb_oracle:start_link(NewOpts).
|
|
||||||
|
|
||||||
sql_query_to_str(SqlQuery) ->
|
sql_query_to_str(SqlQuery) ->
|
||||||
emqx_plugin_libs_rule:str(SqlQuery).
|
emqx_plugin_libs_rule:str(SqlQuery).
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix password leaking on stacktrace for Oracle Database.
|
Loading…
Reference in New Issue