mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-03 14:10:15 +00:00
fix: patch 5 security vulnerabilities across electron, server, and proxy layers (#1292)
Co-authored-by: bytecii <994513625@qq.com>
This commit is contained in:
parent
8d26e1a122
commit
413df36cd8
7 changed files with 323 additions and 26 deletions
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
import logging
|
||||
from typing import Any, cast
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
import requests
|
||||
from exa_py import Exa
|
||||
|
|
@ -129,7 +130,7 @@ def google_search(query: str, search_type: str = "web", key: Key = Depends(key_m
|
|||
# Doc: https://developers.google.com/custom-search/v1/using_rest
|
||||
base_url = (
|
||||
f"https://www.googleapis.com/customsearch/v1?"
|
||||
f"key={GOOGLE_API_KEY}&cx={SEARCH_ENGINE_ID}&q={query}&start="
|
||||
f"key={GOOGLE_API_KEY}&cx={SEARCH_ENGINE_ID}&q={quote_plus(query)}&start="
|
||||
f"{start_page_idx}&lr={search_language}&num={num_result_pages}"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue