-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add Allow-/Block-List for Migrate & Mirrors #13610
Add Allow-/Block-List for Migrate & Mirrors #13610
Conversation
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
Still need to update |
Is that now fixed? |
Yes those look fine now. |
🚀 |
* 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 <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]>
* 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 <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]>
This PR will add two options
blocklist
andallowlist
for migrating repositories from external URLs.When you set
allowlist
thenblocklist
will be ignored and all users on this gitea instance could only migrate repositories from thedomains
onallowlist
.When
allowlist
is empty and you have domains onblocklist
, all users on this gitea instance could migrate repositories any domain except thedomains
onblocklist
.original pull: #8040
close #4462
TODOs: