fix: chi.URLParam中文未解码导致删除失败,加url.PathUnescape

This commit is contained in:
tian 2026-07-26 13:07:57 +08:00
parent 210465cc71
commit 332e36bd8f
2 changed files with 3 additions and 0 deletions

View File

@ -3770,6 +3770,9 @@ func (u *UI) actionAssetVideoSourceDelete(w http.ResponseWriter, r *http.Request
return
}
name := chi.URLParam(r, "name")
if decoded, err := url.PathUnescape(name); err == nil {
name = decoded
}
if err := u.preview.DeleteVideoSource(name); err != nil {
http.Redirect(w, r, "/assets/video-sources?error="+urlQueryEscape(err.Error())+"&name="+url.PathEscape(name), http.StatusFound)
return

Binary file not shown.