aboutsummaryrefslogtreecommitdiffstats
path: root/services/task/task.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-03-31 10:25:40 +0800
committerGitHub <noreply@github.com>2022-03-31 10:25:40 +0800
commitc83168104b8bcb09e3e6e1490bd586a9e1a55bc3 (patch)
tree6732a64a1f40d9c27f3a3215bc847e701367e777 /services/task/task.go
parent84038f33f42b03dbf455e41f5036f67ba7b61a66 (diff)
downloadgitea-c83168104b8bcb09e3e6e1490bd586a9e1a55bc3.tar.gz
gitea-c83168104b8bcb09e3e6e1490bd586a9e1a55bc3.zip
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
Diffstat (limited to 'services/task/task.go')
-rw-r--r--services/task/task.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/task/task.go b/services/task/task.go
index 3f823fc224..9deb0286c5 100644
--- a/services/task/task.go
+++ b/services/task/task.go
@@ -77,7 +77,7 @@ func CreateMigrateTask(doer, u *user_model.User, opts base.MigrateOptions) (*mod
if err != nil {
return nil, err
}
- opts.CloneAddr = util.NewStringURLSanitizer(opts.CloneAddr, true).Replace(opts.CloneAddr)
+ opts.CloneAddr = util.SanitizeCredentialURLs(opts.CloneAddr)
opts.AuthPasswordEncrypted, err = secret.EncryptSecret(setting.SecretKey, opts.AuthPassword)
if err != nil {
return nil, err