forked from tangled.org/core
this repo has no description

crypto: fix signature verification for initial commit

initial commit does not have a parent commit and should be excluded from
the signature check.

Signed-off-by: oppiliappan <me@oppi.li>

authored by oppi.li and committed by Tangled 4205be08 acbad760

Changed files
+4 -2
crypto
+3 -1
crypto/verify.go
··· 50 50 payload := strings.Builder{} 51 51 52 52 fmt.Fprintf(&payload, "tree %s\n", commit.Commit.Tree) 53 - fmt.Fprintf(&payload, "parent %s\n", commit.Commit.Parent) 53 + if commit.Commit.Parent != "" { 54 + fmt.Fprintf(&payload, "parent %s\n", commit.Commit.Parent) 55 + } 54 56 fmt.Fprintf(&payload, "author %s\n", author.String()) 55 57 fmt.Fprintf(&payload, "committer %s\n", committer.String()) 56 58 if commit.Commit.ChangedId != "" {
+1 -1
flake.nix
··· 54 54 inherit (gitignore.lib) gitignoreSource; 55 55 in { 56 56 overlays.default = final: prev: let 57 - goModHash = "sha256-ZckpIPqFk7/XBiEJUbmrAzdjAxV62hv896xqAXF2aZs="; 57 + goModHash = "sha256-QPyeKKr7YMblwicQNemu3OamXwg7fVie6/IY10vQCl4="; 58 58 appviewDeps = { 59 59 inherit htmx-src lucide-src inter-fonts-src ibm-plex-mono-src goModHash gitignoreSource; 60 60 };