mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
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
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user