Просмотр исходного кода

fix(logs): set password field sensitive for connectors

Ilya Averyanov 3 лет назад
Родитель
Сommit
fa7433628c

+ 1 - 0
apps/emqx_connector/src/emqx_connector_schema_lib.erl

@@ -104,6 +104,7 @@ password(type) -> binary();
 password(desc) -> ?DESC("password");
 password(required) -> false;
 password(format) -> <<"password">>;
+password(sensitive) -> true;
 password(_) -> undefined.
 
 auto_reconnect(type) -> boolean();

+ 2 - 0
changes/v5.0.13-en.md

@@ -22,3 +22,5 @@
   Prior to this change, a 'sticky' subscriber may continue to receive messages after unsubscribing.
 
 - Add check to ensure that a given key is among the prepared statements on query in the mysql connector [#9571](https://github.com/emqx/emqx/pull/9571).
+
+- Fix password leak to logs for connectors [#9608](https://github.com/emqx/emqx/pull/9608).

+ 2 - 0
changes/v5.0.13-zh.md

@@ -22,3 +22,5 @@
   在此修复前,使用 'sticky' 策略的订阅客户端可能在取消订阅后继续收到消息。
 
 - 增强 mysql 查询流程,确保给定的查询语句在 mysql 连接器的预编译语句中 [#9571](https://github.com/emqx/emqx/pull/9571)。
+
+- 修复连接器日志的密码泄漏 [#9608](https://github.com/emqx/emqx/pull/9608)。