[v10.0/forgejo] chore: remove illegal git usage (#6492)

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/6488

This is no longer possible in future go-git versions, so lets hardcode it

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6492
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
forgejo-backport-action 2025-01-07 19:01:32 +00:00 committed by Earl Warren
parent f63e5a1cff
commit 3b5f162fe6
8 changed files with 45 additions and 69 deletions

View file

@ -224,6 +224,29 @@ func TestAPIListWikiPages(t *testing.T) {
Message: "add unescaped file\n",
},
},
{
Title: "XSS",
HTMLURL: meta[5].HTMLURL,
SubURL: "XSS",
LastCommit: &api.WikiCommit{
ID: "f54f5a6b7c4f83b606600e43186165854f189530",
Author: &api.CommitUser{
Identity: api.Identity{
Name: "Gusted<script class=\"evil\">alert('Oh no!');</script>",
Email: "valid@example.org",
},
Date: "2024-01-31T00:00:00Z",
},
Committer: &api.CommitUser{
Identity: api.Identity{
Name: "Gusted<script class=\"evil\">alert('Oh no!');</script>",
Email: "valid@example.org",
},
Date: "2024-01-31T00:00:00Z",
},
Message: "Yay XSS",
},
},
}
assert.Equal(t, dummymeta, meta)