|
|
@ -240,7 +240,8 @@ func SettingsPost(ctx *context.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
remoteAddress, err := util.SanitizeURL(form.MirrorAddress)
|
|
|
|
remoteAddress, err := util.SanitizeURL(form.MirrorAddress)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
ctx.ServerError("SanitizeURL", err)
|
|
|
|
ctx.Data["Err_MirrorAddress"] = true
|
|
|
|
|
|
|
|
handleSettingRemoteAddrError(ctx, err, form)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pullMirror.RemoteAddress = remoteAddress
|
|
|
|
pullMirror.RemoteAddress = remoteAddress
|
|
|
@ -401,7 +402,8 @@ func SettingsPost(ctx *context.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
remoteAddress, err := util.SanitizeURL(form.PushMirrorAddress)
|
|
|
|
remoteAddress, err := util.SanitizeURL(form.PushMirrorAddress)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
ctx.ServerError("SanitizeURL", err)
|
|
|
|
ctx.Data["Err_PushMirrorAddress"] = true
|
|
|
|
|
|
|
|
handleSettingRemoteAddrError(ctx, err, form)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|