internal/coreruleset/gitea.conf rule 900601 lets Referer skip five rules (941110, 941120, 941160, 942100, 944100) when it names one of gitea's search pages. Its pattern repeats the one in 900600, so it also matches https://<host>/api/v2/search?…, Mastodon's search, as gitea's search inside a repository (owner api, repository v2). gitea has no owner named api.
Effect: any request whose Referer is https://example.com/api/v2/search?q=<script>… skips those five rules on Referer, on any site.
Fix: leave out the owner api there as #269 does for 900600, with a test that script and SQL injection in such a Referer are refused.
`internal/coreruleset/gitea.conf` rule 900601 lets `Referer` skip five rules (941110, 941120, 941160, 942100, 944100) when it names one of gitea's search pages. Its pattern repeats the one in 900600, so it also matches `https://<host>/api/v2/search?…`, Mastodon's search, as gitea's search inside a repository (owner `api`, repository `v2`). gitea has no owner named `api`.
Effect: any request whose `Referer` is `https://example.com/api/v2/search?q=<script>…` skips those five rules on `Referer`, on any site.
Fix: leave out the owner `api` there as https://git.eeqj.de/sneak/smallwebwaf/pulls/269 does for 900600, with a test that script and SQL injection in such a `Referer` are refused.
Found while fixing https://git.eeqj.de/sneak/smallwebwaf/issues/266.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
internal/coreruleset/gitea.confrule 900601 letsRefererskip five rules (941110, 941120, 941160, 942100, 944100) when it names one of gitea's search pages. Its pattern repeats the one in 900600, so it also matcheshttps://<host>/api/v2/search?…, Mastodon's search, as gitea's search inside a repository (ownerapi, repositoryv2). gitea has no owner namedapi.Effect: any request whose
Refererishttps://example.com/api/v2/search?q=<script>…skips those five rules onReferer, on any site.Fix: leave out the owner
apithere as #269 does for 900600, with a test that script and SQL injection in such aRefererare refused.Found while fixing #266.
Model: opus-5-5