]> source.dussan.org Git - gitea.git/commit
Only allow webhook to send requests to allowed hosts (#17482) (#17510)
authorwxiaoguang <wxiaoguang@gmail.com>
Sat, 6 Nov 2021 09:23:43 +0000 (17:23 +0800)
committerGitHub <noreply@github.com>
Sat, 6 Nov 2021 09:23:43 +0000 (09:23 +0000)
commit20ae1849676ea860286b5e988dcb73f142dc9f3b
tree61a8225624d68265492595b12221af2275a6c4e2
parent15b44496ec18dab2af2ac71418e88e3390074702
Only allow webhook to send requests to allowed hosts (#17482) (#17510)

Backport #17482

* Only allow webhook to send requests to allowed hosts (backport #17482)

* use ALLOWED_HOST_LIST=* for default to keep the legacy behavior in 1.15.x
cmd/web.go
custom/conf/app.example.ini
docs/content/doc/advanced/config-cheat-sheet.en-us.md
modules/hostmatcher/hostmatcher.go [new file with mode: 0644]
modules/hostmatcher/hostmatcher_test.go [new file with mode: 0644]
modules/migrations/migrate.go
modules/setting/webhook.go
modules/util/net.go [new file with mode: 0644]
services/webhook/deliver.go