{"record":{"id":"179426f7ef5646d1","repo":"googleapis/mcp-toolbox","slug":"invalid-cidr-or-ip-address-q-w","errorCode":null,"errorMessage":"invalid CIDR or IP address %q: %w","messagePattern":"invalid CIDR or IP address %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/http/http.go","lineNumber":310,"sourceCode":"\tfor _, entry := range list {\n\t\tentry = strings.TrimSpace(entry)\n\t\tif entry == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\t// If it is a single IP address (does not contain a slash), we can append /32 or /128\n\t\tif !strings.Contains(entry, \"/\") {\n\t\t\tip := net.ParseIP(entry)\n\t\t\tif ip != nil {\n\t\t\t\tif ip.To4() != nil {\n\t\t\t\t\tentry = entry + \"/32\"\n\t\t\t\t} else {\n\t\t\t\t\tentry = entry + \"/128\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_, ipNet, err := net.ParseCIDR(entry)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid CIDR or IP address %q: %w\", entry, err)\n\t\t}\n\t\tnets = append(nets, ipNet)\n\t}\n\treturn nets, nil\n}\n\nfunc createHTTPClient(duration time.Duration, tr *http.Transport, guard *SSRFGuard, res dnsResolver) (*http.Client, error) {\n\tif res != nil {\n\t\tguard.Resolver = res\n\t}\n\n\tresolver := guard.Resolver\n\tif resolver == nil {\n\t\tresolver = net.DefaultResolver\n\t}\n\n\tdialer := &net.Dialer{\n\t\tTimeout:   30 * time.Second,","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/http/http.go#L292-L328","documentation":"Error \"invalid CIDR or IP address %q: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/http/http.go:310 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}