chore: remove illegal git usage

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

(cherry picked from commit 58ee57d5f2e547ba0786b2b5ebe87caa3ca545d5)
This commit is contained in:
Gusted 2025-01-08 04:35:32 +01:00
parent 9651e9d002
commit 1c825edb1a
No known key found for this signature in database
GPG key ID: FD821B732837125F
7 changed files with 44 additions and 67 deletions

View file

@ -198,6 +198,29 @@ func TestAPIListWikiPages(t *testing.T) {
Message: "add unescaped file\n",
},
},
{
Title: "XSS",
HTMLURL: meta[4].HTMLURL,
SubURL: "XSS",
LastCommit: &api.WikiCommit{
ID: "33d12aaaf988976c9dbd0fed80107d34a3b7c333",
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)