mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-12 21:59:29 +01:00
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
1 changed files with 4 additions and 2 deletions
|
@ -480,7 +480,8 @@ func SettingsPost(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
remoteAddress, err := util.SanitizeURL(address)
|
remoteAddress, err := util.SanitizeURL(address)
|
||||||
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
|
||||||
|
@ -661,7 +662,8 @@ func SettingsPost(ctx *context.Context) {
|
||||||
|
|
||||||
remoteAddress, err := util.SanitizeURL(address)
|
remoteAddress, err := util.SanitizeURL(address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ServerError("SanitizeURL", err)
|
ctx.Data["Err_PushMirrorAddress"] = true
|
||||||
|
handleSettingRemoteAddrError(ctx, err, form)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue