17 matches across 1 files for error lang:Python lang:Python path:libs/core/langchain_core/_security/_policy.py lang:Python
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# ---------------------------------------------------------------------------
· · ·
192 """Validate a resolved IP address against the SSRF policy.
193
194 Raises SSRFBlockedError if the IP is blocked.
195 """
196 try:
· · ·
197 addr = ipaddress.ip_address(ip_str)
198 except ValueError as exc:
199 raise SSRFBlockedError("invalid IP address") from exc
200
· · ·
199 raise SSRFBlockedError("invalid IP address") from exc
200
201 if isinstance(addr, ipaddress.IPv6Address):
· · ·
206 reason = _ip_in_blocked_networks(addr, policy)
207 if reason is not None:
208 raise SSRFBlockedError(reason)
209
210
+ 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.