Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: render password in ghost (#9485)

Danny Xu478bc15e8567
diff --git a/backend/component/ghost/config.go b/backend/component/ghost/config.go
index 02e0917113..429ab06d18 100644
--- a/backend/component/ghost/config.go
+++ b/backend/component/ghost/config.go
@@ -9,6 +9,8 @@ import (
ghostsql "github.com/github/gh-ost/go/sql"
"github.com/pkg/errors"
+ secretcomp "github.com/bytebase/bytebase/backend/component/secret"
+
"github.com/bytebase/bytebase/backend/common"
"github.com/bytebase/bytebase/backend/store"
)
@@ -215,6 +217,11 @@ func NewMigrationContext(taskID int, database *store.DatabaseMessage, dataSource
if err != nil {
return nil, errors.Wrapf(err, "failed to get password")
}
+ updatedPassword, err := secretcomp.ReplaceExternalSecret(password)
+ if err != nil {
+ return nil, err
+ }
+ password = updatedPassword
migrationContext := base.NewMigrationContext()
migrationContext.InspectorConnectionConfig.Key.Hostname = dataSource.Host