aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/lfs.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-03-08 20:17:39 +0800
committerGitHub <noreply@github.com>2023-03-08 20:17:39 +0800
commitb116418f05b822481bba3613873eef876da73814 (patch)
tree65d1d88d940c26029e7ef920c4dd30761763ce46 /routers/web/repo/lfs.go
parent090e75392385041b3abb30d02564962a3ff687f6 (diff)
downloadgitea-b116418f05b822481bba3613873eef876da73814.tar.gz
gitea-b116418f05b822481bba3613873eef876da73814.zip
Use CleanPath instead of path.Clean (#23371)
As title.
Diffstat (limited to 'routers/web/repo/lfs.go')
-rw-r--r--routers/web/repo/lfs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/lfs.go b/routers/web/repo/lfs.go
index 869a69c377..43f5527986 100644
--- a/routers/web/repo/lfs.go
+++ b/routers/web/repo/lfs.go
@@ -207,7 +207,7 @@ func LFSLockFile(ctx *context.Context) {
ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks")
return
}
- lockPath = path.Clean("/" + lockPath)[1:]
+ lockPath = util.CleanPath(lockPath)
if len(lockPath) == 0 {
ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_locking_path", originalPath))
ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks")