17 matches across 1 files for error lang:Python path:libs/core/langchain_core/_security/_policy.py
snippet_mode: auto · sorted by relevance
libs/core/langchain_core/_security/_policy.py PYTHON 17 matches · showing 5 view file →
8import urllib.parse
9
10from langchain_core._security._exceptions import SSRFBlockedError
11
12# ---------------------------------------------------------------------------
· · ·
195 """Validate a resolved IP address against the SSRF policy.
196
197 Raises SSRFBlockedError if the IP is blocked.
198 """
199 try:
· · ·
200 addr = ipaddress.ip_address(ip_str)
201 except ValueError as exc:
202 msg = "invalid IP address"
203 raise SSRFBlockedError(msg) from exc
· · ·
203 raise SSRFBlockedError(msg) from exc
204
205 if isinstance(addr, ipaddress.IPv6Address):
· · ·
210 reason = _ip_in_blocked_networks(addr, policy)
211 if reason is not None:
212 raise SSRFBlockedError(reason)
213
214
+ 12 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.