refactor: enhance SSRF safety checks in MinerUCloudReader
- Removed hardcoded IP address from blocked hosts in `system.go`. - Integrated SSRF safety checks in `MinerUCloudReader` for base URL and zip URL validation. - Updated HTTP client initialization to use a new utility function for SSRF-safe HTTP clients, improving security during API requests. These changes enhance the security of the MinerUCloudReader by ensuring that potentially unsafe URLs are properly validated before use.
This commit is contained in:
@@ -646,7 +646,6 @@ func isBlockedStorageEndpoint(endpoint string) (bool, string) {
|
||||
"metadata.google.internal",
|
||||
"metadata.tencentyun.com",
|
||||
"metadata.aws.internal",
|
||||
"169.254.169.254",
|
||||
}
|
||||
for _, bh := range blockedHosts {
|
||||
if hostLower == bh {
|
||||
|
||||
Reference in New Issue
Block a user