New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only allow webhook to send requests to allowed hosts #17482
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e4f9871
to
d6358bc
delvh
reviewed
Oct 29, 2021
lafriks
reviewed
Oct 29, 2021
Re-worked the documents, unit tests and comments. |
Codecov Report
@@ Coverage Diff @@
## main #17482 +/- ##
==========================================
+ Coverage 45.49% 45.51% +0.01%
==========================================
Files 791 793 +2
Lines 88717 88772 +55
==========================================
+ Hits 40364 40404 +40
- Misses 41842 41855 +13
- Partials 6511 6513 +2
Continue to review full report at Codecov.
|
delvh
approved these changes
Oct 30, 2021
lunny
reviewed
Oct 31, 2021
6543
reviewed
Oct 31, 2021
techknowlogick
approved these changes
Oct 31, 2021
@wxiaoguang please send backport :) |
wxiaoguang
added a commit
to wxiaoguang/gitea
that referenced
this issue
Nov 1, 2021
zeripath
pushed a commit
that referenced
this issue
Nov 6, 2021
melegiul
added a commit
to netzbegruenung/gitea
that referenced
this issue
Nov 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
For security reasons, the webhook should only send requests to allowed hosts.
This PR introduces a setting option:
ALLOWED_HOST_LIST
: external: Webhook can only call allowed hosts for security reasons. Comma separated list:loopback
,private
,external
, or*
, or CIDR list (1.2.3.0/8), or wildcard hosts (*.mydomain.com)ps: I added a log message
log.Info("AppURL(ROOT_URL): %s", setting.AppURL)
during starting. It is very trivial (but helpful) so I think it's fine to put it here. There are more comments in code.The text was updated successfully, but these errors were encountered: