fix(security): support IPv6 in SSRF validation via whitelist mechanism
- Keep strict mode blocking all direct IPs (IPv4 and IPv6 uniformly) - Unify all SSRF call sites to use ValidateURLForSSRF (whitelist-aware) - Add Teredo (2001:0000::/32) and 6to4 (2002::/16) tunnel detection - Make redirect handler and DNS pinning respect SSRF_WHITELIST - Unexport isSSRFSafeURL to prevent future callers bypassing whitelist - Add scheme validation for whitelisted redirect targets - Document IPv6 whitelist syntax in .env.example - Add comprehensive IPv6 test coverage
This commit is contained in:
@@ -643,7 +643,7 @@ func sanitizeStorageCheckError(err error) string {
|
||||
}
|
||||
|
||||
// isBlockedStorageEndpoint checks whether a storage endpoint resolves to a dangerous
|
||||
// address (cloud metadata, loopback, link-local). Unlike the stricter IsSSRFSafeURL,
|
||||
// address (cloud metadata, loopback, link-local). Unlike the stricter isSSRFSafeURL,
|
||||
// this allows private IPs since MinIO is commonly deployed on internal networks.
|
||||
// It also respects the SSRF_WHITELIST environment variable for whitelisted hosts.
|
||||
func isBlockedStorageEndpoint(endpoint string) (bool, string) {
|
||||
|
||||
Reference in New Issue
Block a user