fix: tag contain character ) will http 500 on release page (#1670)

tokarchuk/v1.17
Bo-Yi Wu 8 years ago committed by GitHub
parent 700b6b524b
commit 75f1afd1fd
  1. 1
      routers/repo/release.go
  2. 2
      vendor/code.gitea.io/git/repo_tag.go
  3. 6
      vendor/vendor.json

@ -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"
)

@ -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
}

@ -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=",

Loading…
Cancel
Save