Add Allow-/Block-List for Migrate & Mirrors#13610
Merged
techknowlogick merged 38 commits intoNov 29, 2020
Merged
Conversation
6543
commented
Nov 17, 2020
6543
commented
Nov 17, 2020
Codecov Report
@@ Coverage Diff @@
## master #13610 +/- ##
==========================================
+ Coverage 42.21% 42.24% +0.02%
==========================================
Files 697 698 +1
Lines 76845 76917 +72
==========================================
+ Hits 32439 32490 +51
- Misses 39054 39063 +9
- Partials 5352 5364 +12
Continue to review full report at Codecov.
|
da14604 to
af32a09
Compare
6543
commented
Nov 23, 2020
zeripath
approved these changes
Nov 28, 2020
Member
|
Still need to update |
zeripath
reviewed
Nov 28, 2020
Contributor
Is that now fixed? |
Member
|
Yes those look fine now. |
lunny
approved these changes
Nov 28, 2020
Member
Author
|
🚀 |
6543
added a commit
to 6543-forks/gitea
that referenced
this pull request
Dec 1, 2020
* add black list and white list support for migrating repositories * specify log message * use blocklist/allowlist * allways use lowercase to match url * Apply allow/block * Settings: use existing "migrations" section * convert domains lower case * dont store unused value * Block private addresses for migration by default * use proposed-upstream func to detect private IP addr * add own error for blocked migration, add tests, imprufe api * fix test * fix-if-localhost-is-ipv4 * rename error & error message * rename setting options * Apply suggestions from code review Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
techknowlogick
added a commit
that referenced
this pull request
Dec 2, 2020
* add black list and white list support for migrating repositories * specify log message * use blocklist/allowlist * allways use lowercase to match url * Apply allow/block * Settings: use existing "migrations" section * convert domains lower case * dont store unused value * Block private addresses for migration by default * use proposed-upstream func to detect private IP addr * add own error for blocked migration, add tests, imprufe api * fix test * fix-if-localhost-is-ipv4 * rename error & error message * rename setting options * Apply suggestions from code review Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will add two options
blocklistandallowlistfor migrating repositories from external URLs.When you set
allowlistthenblocklistwill be ignored and all users on this gitea instance could only migrate repositories from thedomainsonallowlist.When
allowlistis empty and you have domains onblocklist, all users on this gitea instance could migrate repositories any domain except thedomainsonblocklist.original pull: #8040
close #4462
TODOs: