1
0
Fork 0
forked from forgejo/forgejo

Include encoding in signature payload (#30174) (#30181)

Backport #30174 by @KN4CK3R

Fixes #30119

Include the encoding in the signature payload.

before

![grafik](01ab94a3-8af5-4d6f-be73-a10b65a15421)

after

![grafik](3a37d438-c70d-4d69-b178-d170e74aa683)

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit 2ac78c75d08cbd4c9a47e982021789e6d85a1a32)
This commit is contained in:
Giteabot 2024-04-01 09:47:11 +08:00 committed by Earl Warren
parent 953914d1f7
commit 8d3db1264c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 75 additions and 0 deletions

View file

@ -47,6 +47,12 @@ func convertPGPSignature(c *object.Commit) *CommitGPGSignature {
return nil
}
if c.Encoding != "" && c.Encoding != "UTF-8" {
if _, err = fmt.Fprintf(&w, "\nencoding %s\n", c.Encoding); err != nil {
return nil
}
}
if _, err = fmt.Fprintf(&w, "\n\n%s", c.Message); err != nil {
return nil
}