[MM-63760] Only partially sanitize DB datasources for Support Packet (#30728)

Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
Ben Schumacher
2025-06-06 15:07:54 +02:00
коммит произвёл GitHub
родитель 160cb91ab9
Коммит 5b389c5224
11 изменённых файлов: 183 добавлений и 111 удалений

Просмотреть файл

@@ -42,7 +42,7 @@ func (ps *PlatformService) Config() *model.Config {
}
// getSanitizedConfig gets the configuration without any secrets.
func (ps *PlatformService) getSanitizedConfig(rctx request.CTX) *model.Config {
func (ps *PlatformService) getSanitizedConfig(rctx request.CTX, opts *model.SanitizeOptions) *model.Config {
cfg := ps.Config().Clone()
manifests, err := ps.getPluginManifests()
@@ -50,9 +50,9 @@ func (ps *PlatformService) getSanitizedConfig(rctx request.CTX) *model.Config {
// getPluginManifests might error, e.g. when plugins are disabled.
// Sanitize all plugin settings in this case.
rctx.Logger().Warn("Failed to get plugin manifests for config sanitization. Will sanitize all plugin settings.", mlog.Err(err))
cfg.Sanitize(nil)
cfg.Sanitize(nil, opts)
} else {
cfg.Sanitize(manifests)
cfg.Sanitize(manifests, opts)
}
return cfg