Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f1b0a14b4 |
@@ -694,10 +694,7 @@ func TestOrdinaryGiteaRequestsPassAndAttacksAreRefused(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Nor is a page opened from them.
|
// Nor is a page opened from them.
|
||||||
for _, attack := range []string{
|
for _, attack := range []string{scriptTag, injection} {
|
||||||
"<script>alert(1)</script>",
|
|
||||||
"1' OR '1'='1",
|
|
||||||
} {
|
|
||||||
referer := "Referer: https://example.com" + path + "?q=" + attack
|
referer := "Referer: https://example.com" + path + "?q=" + attack
|
||||||
if got := inspect(t, crs, get("/", referer)); got.Score < threshold {
|
if got := inspect(t, crs, get("/", referer)); got.Score < threshold {
|
||||||
t.Errorf("%s let through: %+v", referer, got)
|
t.Errorf("%s let through: %+v", referer, got)
|
||||||
|
|||||||
Reference in new issue
Block a user