You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules
Giteabot dab40cd5f4
Support allowed hosts for webhook to work with proxy (#27655) (#27675)
Backport #27655 by @wolfogre

When `webhook.PROXY_URL` has been set, the old code will check if the
proxy host is in `ALLOWED_HOST_LIST` or reject requests through the
proxy. It requires users to add the proxy host to `ALLOWED_HOST_LIST`.
However, it actually allows all requests to any port on the host, when
the proxy host is probably an internal address.

But things may be even worse. `ALLOWED_HOST_LIST` doesn't really work
when requests are sent to the allowed proxy, and the proxy could forward
them to any hosts.

This PR fixes it by:

- If the proxy has been set, always allow connectioins to the host and
port.
- Check `ALLOWED_HOST_LIST` before forwarding.

Co-authored-by: Jason Song <i@wolfogre.com>
1 year ago
..
actions chore(actions): support cron schedule task (#26655) 2 years ago
activitypub More refactoring of `db.DefaultContext` (#27083) 2 years ago
analyze Rename code_langauge.go to code_language.go (#26377) 2 years ago
assetfs Use `Set[Type]` instead of `map[Type]bool/struct{}`. (#26804) 2 years ago
auth Next round of `db.DefaultContext` refactor (#27089) 2 years ago
avatar Remove nfnt/resize and oliamb/cutter (#25999) 2 years ago
base Replace `interface{}` with `any` (#25686) 2 years ago
cache improve unit test for caching (#26185) 2 years ago
charset Replace `interface{}` with `any` (#25686) 2 years ago
container
context Add support for HEAD ref in /src/branch and /src/commit routes (#27384) (#27407) 2 years ago
contexttest Avoid double-unescaping of form value (#26853) 2 years ago
csv Refactor locale number (#24134) 2 years ago
doctor fix orphan check for deleted branch (#27310) (#27321) 2 years ago
emoji Update emoji set to Unicode 15 (#25595) 2 years ago
eventsource More `db.DefaultContext` refactor (#27265) (#27347) 2 years ago
generate Handle base64 decoding correctly to avoid panic (#26483) 2 years ago
git Fix git 2.11 error when checking IsEmpty (#27393) (#27397) 2 years ago
gitgraph More `db.DefaultContext` refactor (#27265) (#27347) 2 years ago
graceful Allow the use of alternative net.Listener implementations by downstreams (#25855) 2 years ago
hcaptcha
highlight Upgrade go dependencies (#25819) 2 years ago
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) (#27675) 1 year ago
html Refactor backend SVG package and add tests (#26335) 2 years ago
httpcache Less naked returns (#25713) 2 years ago
httplib Less naked returns (#25713) 2 years ago
indexer Improve retrying index issues (#27554) (#27634) 1 year ago
issue/template Replace `interface{}` with `any` (#25686) 2 years ago
json Replace `interface{}` with `any` (#25686) 2 years ago
label
lfs Refactor lfs requests (#26783) 2 years ago
log Reduce some allocations in type conversion (#26772) 2 years ago
markup fix media description render for orgmode (#26895) 2 years ago
mcaptcha
metrics Reduce usage of `db.DefaultContext` (#27073) 2 years ago
migration Replace `interface{}` with `any` (#25686) 2 years ago
nosql Update tool dependencies, lock govulncheck and actionlint (#25655) 2 years ago
options
packages Use docs.gitea.com instead of docs.gitea.io (#26739) 2 years ago
paginator Use more specific test methods (#24265) 2 years ago
pprof
private Replace `interface{}` with `any` (#25686) 2 years ago
process Less naked returns (#25713) 2 years ago
proxy
proxyprotocol
public Serve pre-defined files in "public", add "security.txt", add CORS header for ".well-known" (#25974) 2 years ago
queue Increase queue length (#27555) (#27562) 1 year ago
recaptcha
references Replace 'userxx' with 'orgxx' in all test files when the user type is org (#27052) 2 years ago
regexplru Upgrade go dependencies (#25819) 2 years ago
repository Refactor system setting (#27000) (#27452) 1 year ago
secret Improve decryption failure message (#24573) 2 years ago
session Next round of `db.DefaultContext` refactor (#27089) 2 years ago
setting Increase queue length (#27555) (#27562) 1 year ago
sitemap
ssh restrict certificate type for builtin SSH server (#26789) 2 years ago
storage Fix object storage path handling (#27024) 2 years ago
structs Restore warning commit status (#27504) (#27529) 1 year ago
svg Refactor backend SVG package and add tests (#26335) 2 years ago
sync
system
templates More `db.DefaultContext` refactor (#27265) (#27347) 2 years ago
test Move web/api context related testing function into a separate package (#26859) 2 years ago
testlogger Replace `interface{}` with `any` (#25686) 2 years ago
timeutil Fix incorrect webhook time and use relative-time to display it (#24477) 2 years ago
translation Replace `interface{}` with `any` (#25686) 2 years ago
turnstile
typesniffer Detect ogg mime-type as audio or video (#26494) 2 years ago
updatechecker
upload
uri
user
util Refactor lfs requests (#26783) 2 years ago
validation Check blocklist for emails when adding them to account (#26812) 2 years ago
web Update tool dependencies (#26607) 2 years ago
webhook New webhook trigger for receiving Pull Request review requests (#24481) 2 years ago