mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-09 15:02:32 +00:00
chore: fix legacy git ref problems (#38827)
1. add correct "refs/heads" prefix to the branch name for commit graph 2. fix incorrect cache key in GetCommitGraphsCount 3. remove the "--" trim for the tag name, there is no security vulnerability, we never do so anywhere else Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
// EncodeSha256 string to sha256 hex value.
|
||||
func EncodeSha256(str string) string {
|
||||
h := sha256.New()
|
||||
_, _ = h.Write([]byte(str))
|
||||
_, _ = h.Write(util.UnsafeStringToBytes(str))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user