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; -*-
|
||||
|
||||
{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_resource, {path, "../../apps/emqx_resource"}}
|
||||
]}.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_oracle, [
|
||||
{description, "EMQX Enterprise Oracle Database Connector"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
|
|
@ -96,7 +96,7 @@ on_start(
|
|||
{host, Host},
|
||||
{port, Port},
|
||||
{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)},
|
||||
{service_name, emqx_plugin_libs_rule:str(ServiceName)},
|
||||
{database, DB},
|
||||
|
@ -258,9 +258,7 @@ oracle_host_options() ->
|
|||
?ORACLE_HOST_OPTIONS.
|
||||
|
||||
connect(Opts) ->
|
||||
Password = emqx_secret:unwrap(proplists:get_value(password, Opts)),
|
||||
NewOpts = lists:keyreplace(password, 1, Opts, {password, Password}),
|
||||
jamdb_oracle:start_link(NewOpts).
|
||||
jamdb_oracle:start_link(Opts).
|
||||
|
||||
sql_query_to_str(SqlQuery) ->
|
||||
emqx_plugin_libs_rule:str(SqlQuery).
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix password leaking on stacktrace for Oracle Database.
|
Loading…
Reference in New Issue