From c83168104b8bcb09e3e6e1490bd586a9e1a55bc3 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 31 Mar 2022 10:25:40 +0800 Subject: Use a more general (and faster) method to sanitize URLs with credentials (#19239) Use a more general method to sanitize URLs with credentials: Simple and intuitive / Faster / Remove all credentials in all URLs --- models/migrations/v180.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models/migrations') diff --git a/models/migrations/v180.go b/models/migrations/v180.go index 1b735c2035..492c91f1b9 100644 --- a/models/migrations/v180.go +++ b/models/migrations/v180.go @@ -112,7 +112,7 @@ func removeCredentials(payload string) (string, error) { opts.AuthPassword = "" opts.AuthToken = "" - opts.CloneAddr = util.NewStringURLSanitizer(opts.CloneAddr, true).Replace(opts.CloneAddr) + opts.CloneAddr = util.SanitizeCredentialURLs(opts.CloneAddr) confBytes, err := json.Marshal(opts) if err != nil { -- cgit v1.2.3