Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e0bfa92da |
@@ -694,7 +694,10 @@ func TestOrdinaryGiteaRequestsPassAndAttacksAreRefused(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Nor is a page opened from them.
|
// Nor is a page opened from them.
|
||||||
for _, attack := range []string{scriptTag, injection} {
|
for _, attack := range []string{
|
||||||
|
"<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