MM-51768: Scrub username/password from SQL datasource (#22731)
https://mattermost.atlassian.net/browse/MM-51768 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1762dfce22
Коммит
dacac2e3ed
@@ -237,7 +237,9 @@ func SetupConnection(connType string, dataSource string, settings *model.SqlSett
|
||||
}
|
||||
|
||||
for i := 0; i < DBPingAttempts; i++ {
|
||||
mlog.Info("Pinging SQL", mlog.String("database", connType), mlog.String("dataSource", dataSource))
|
||||
// At this point, we have passed sql.Open, so we deliberately ignore any errors.
|
||||
sanitized, _ := SanitizeDataSource(*settings.DriverName, dataSource)
|
||||
mlog.Info("Pinging SQL", mlog.String("database", connType), mlog.String("dataSource", sanitized))
|
||||
ctx, cancel := context.WithTimeout(context.Background(), DBPingTimeoutSecs*time.Second)
|
||||
defer cancel()
|
||||
err = db.PingContext(ctx)
|
||||
|
||||
Ссылка в новой задаче
Block a user