From 75f1afd1fd89877d279c0b32bf00057cdda15224 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 4 May 2017 23:38:34 +0800 Subject: [PATCH] fix: tag contain character ) will http 500 on release page (#1670) --- routers/repo/release.go | 1 + vendor/code.gitea.io/git/repo_tag.go | 2 +- vendor/vendor.json | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/routers/repo/release.go b/routers/repo/release.go index 47dba813a4..d8b7faf21a 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markdown" "code.gitea.io/gitea/modules/setting" + "github.com/Unknwon/paginater" ) diff --git a/vendor/code.gitea.io/git/repo_tag.go b/vendor/code.gitea.io/git/repo_tag.go index 6503c8ada3..4474f7862b 100644 --- a/vendor/code.gitea.io/git/repo_tag.go +++ b/vendor/code.gitea.io/git/repo_tag.go @@ -122,7 +122,7 @@ func parseTag(line string, opt TagOption) (*Tag, error) { if start < 0 { return nil, nil } - end := strings.IndexByte(left[start+1:], ')') + end := strings.LastIndexByte(left[start+1:], ')') if end < 0 { return nil, nil } diff --git a/vendor/vendor.json b/vendor/vendor.json index 74749b8a93..b58040627d 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -3,10 +3,10 @@ "ignore": "test appengine", "package": [ { - "checksumSHA1": "spqE5xUEPQp8YV67McMTMAUIilY=", + "checksumSHA1": "wvujc6YaEoP3g2K+USjIcZcrRgQ=", "path": "code.gitea.io/git", - "revision": "3f99247c0da807afc967c7e12b14f4109b7490ff", - "revisionTime": "2017-04-26T13:12:33Z" + "revision": "ed175468f8debc8cdb2fa495fc157f1b9d046628", + "revisionTime": "2017-05-04T06:58:26Z" }, { "checksumSHA1": "vdziKobpPIkU/dLvSI8n7eWrIIE=",