mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-07 07:07:40 +00:00
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:
parent
9651e9d002
commit
1c825edb1a
7 changed files with 44 additions and 67 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue