mirror of
https://github.com/go-gitea/gitea.git
synced 2026-12-01 15:46:08 +00:00
Extract the username and password from the mirror url (#7651)
* Explode out mirror username and password * Update models/repo_mirror.go * Just roundtrip the password * remove unused declaration * Update templates/repo/settings/options.tmpl
This commit is contained in:
1 parent
867f46f78e
commit
bee1227b2f
5 files changed
+69
-10
No files matched your search
@@ -169,6 +169,10 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
|
||||
return
|
||||
}
|
||||
|
||||
if form.MirrorUsername != "" || form.MirrorPassword != "" {
|
||||
u.User = url.UserPassword(form.MirrorUsername, form.MirrorPassword)
|
||||
}
|
||||
|
||||
// Now use xurls
|
||||
address := validFormAddress.FindString(form.MirrorAddress)
|
||||
if address != form.MirrorAddress && form.MirrorAddress != "" {
|
||||
|
||||
Reference in new issue
Block a user