Don't return 500 if mirror url contains special chars (#31859)
Fix #31640 (cherry picked from commit d158472a5a9ead8052095b153821a9f26c294452)
This commit is contained in:
parent
dda53569b1
commit
3ade4d9b2b
|
@ -480,7 +480,8 @@ func SettingsPost(ctx *context.Context) {
|
|||
}
|
||||
remoteAddress, err := util.SanitizeURL(address)
|
||||
if err != nil {
|
||||
ctx.ServerError("SanitizeURL", err)
|
||||
ctx.Data["Err_MirrorAddress"] = true
|
||||
handleSettingRemoteAddrError(ctx, err, form)
|
||||
return
|
||||
}
|
||||
pullMirror.RemoteAddress = remoteAddress
|
||||
|
@ -661,7 +662,8 @@ func SettingsPost(ctx *context.Context) {
|
|||
|
||||
remoteAddress, err := util.SanitizeURL(address)
|
||||
if err != nil {
|
||||
ctx.ServerError("SanitizeURL", err)
|
||||
ctx.Data["Err_PushMirrorAddress"] = true
|
||||
handleSettingRemoteAddrError(ctx, err, form)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue