mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 14:16:05 +00:00
Harden protection with pinned requests and path-param encoding (#2486)
* Harden protection with pinned requests and path-param encoding * fix: domain pinning * fix: tests * fix: html test 2 --------- Co-authored-by: Alex <a@tushynski.me>
This commit is contained in:
1 parent
6cfdc4fbae
commit
aaad51f951
20 files changed
+623
-723
No files matched your search
@@ -1276,11 +1276,7 @@ class TestCrawlerMarkdownEdge:
|
||||
|
||||
loader = CrawlerLoader()
|
||||
with patch(
|
||||
"application.parser.remote.crawler_markdown.validate_url",
|
||||
side_effect=lambda u: u,
|
||||
), patch.object(
|
||||
loader.session,
|
||||
"get",
|
||||
"application.parser.remote.crawler_markdown.pinned_request",
|
||||
side_effect=requests.exceptions.ConnectionError("fail"),
|
||||
):
|
||||
result = loader._fetch_page("http://fail.com")
|
||||
|
||||
Reference in new issue
Block a user