mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17: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:
@@ -129,7 +129,7 @@ func runMigrateTask(t *models.Task) (err error) {
|
||||
}
|
||||
|
||||
// remoteAddr may contain credentials, so we sanitize it
|
||||
err = util.NewStringURLSanitizedError(err, opts.CloneAddr, true)
|
||||
err = util.SanitizeErrorCredentialURLs(err)
|
||||
if strings.Contains(err.Error(), "Authentication failed") ||
|
||||
strings.Contains(err.Error(), "could not read Username") {
|
||||
return fmt.Errorf("Authentication failed: %v", err.Error())
|
||||
|
Reference in New Issue
Block a user