Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: render password in ghost (#9485)
Danny Xu478bc15e8567
diff --git a/backend/component/ghost/config.go b/backend/component/ghost/config.goindex 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, dataSourceif err != nil {return nil, errors.Wrapf(err, "failed to get password")}+ updatedPassword, err := secretcomp.ReplaceExternalSecret(password)+ if err != nil {+ return nil, err+ }+ password = updatedPasswordmigrationContext := base.NewMigrationContext()migrationContext.InspectorConnectionConfig.Key.Hostname = dataSource.Host