diff options
author | Hubert WawrzyĆczyk <107928848+fitithw@users.noreply.github.com> | 2022-10-24 13:57:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 19:57:19 +0800 |
commit | 0571ddc368efda40479a3b817fba5e3cb704e47b (patch) | |
tree | 1712eba6cda9a431ce9269b140b6d51b28dd9e2f /routers/api | |
parent | 6b7ce726c21f9bc666e55a6eeccd9244010419c2 (diff) | |
download | gitea-0571ddc368efda40479a3b817fba5e3cb704e47b.tar.gz gitea-0571ddc368efda40479a3b817fba5e3cb704e47b.zip |
Case-insensitive NuGet symbol file GUID (#21409) (#21575)
Backport of #21409
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/packages/api.go | 2 | ||||
-rw-r--r-- | routers/api/packages/nuget/nuget.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/packages/api.go b/routers/api/packages/api.go index dd5cf4a4c0..96924698a3 100644 --- a/routers/api/packages/api.go +++ b/routers/api/packages/api.go @@ -190,7 +190,7 @@ func Routes() *web.Route { r.Put("/symbolpackage", nuget.UploadSymbolPackage) r.Delete("/{id}/{version}", nuget.DeletePackage) }, reqPackageAccess(perm.AccessModeWrite)) - r.Get("/symbols/{filename}/{guid:[0-9a-f]{32}}FFFFFFFF/{filename2}", nuget.DownloadSymbolFile) + r.Get("/symbols/{filename}/{guid:[0-9a-fA-F]{32}[fF]{8}}/{filename2}", nuget.DownloadSymbolFile) }, reqPackageAccess(perm.AccessModeRead)) }) r.Group("/npm", func() { diff --git a/routers/api/packages/nuget/nuget.go b/routers/api/packages/nuget/nuget.go index 6bdd0ed5e0..d420bfbf05 100644 --- a/routers/api/packages/nuget/nuget.go +++ b/routers/api/packages/nuget/nuget.go @@ -351,7 +351,7 @@ func processUploadedFile(ctx *context.Context, expectedType nuget_module.Package // DownloadSymbolFile https://github.com/dotnet/symstore/blob/main/docs/specs/Simple_Symbol_Query_Protocol.md#request func DownloadSymbolFile(ctx *context.Context) { filename := ctx.Params("filename") - guid := ctx.Params("guid") + guid := ctx.Params("guid")[:32] filename2 := ctx.Params("filename2") if filename != filename2 { |