[Bug]: HTTP crawler puts proxy credentials into the URL unencoded
Maintainer thường phản hồi trong vòng 3 ngày
@omarbounawarapy đang làm issue này rồi.
Từ ngày 1/10/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- backend, networking, security
Hướng nghiên cứu
Bắt đầu trong async_crawler_strategy.py tại _format_proxy_url quanh dòng 2634, sau đó lần theo việc sử dụng nó làm đối số proxy quanh dòng 2737. Tái hiện các trường hợp ký tự đặc biệt được liệt kê bằng aiohttp và bổ sung kiểm thử hồi quy tập trung. Công việc được xem là hoàn tất khi các yêu cầu proxy hợp lệ giữ nguyên thông tin xác thực theo đúng nghĩa đen và các lỗi không để lộ mật khẩu trong URL lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
crawl4ai version
0.9.4 (same code on develop at 1f68e5b)
Expected Behavior
AsyncHTTPCrawlerStrategy works through a proxy whose username or password contains #, /, ? or %, as the browser path already does (it passes username and password to Playwright as separate fields).
Current Behavior
_format_proxy_url (async_crawler_strategy.py:2634) builds f"{protocol}://{username}:{password}@{rest}" without percent-encoding. Results with aiohttp 3.14.3 against a local proxy:
| password | result |
|---|---|
plainpass, p@ss |
correct credentials sent |
p#ss, pa/ss, p?ss |
aiohttp.InvalidURL, request never sent |
p%41ss |
proxy receives pAss |
The InvalidURL message is the whole URL, and the except aiohttp.ClientError branch re-raises it as HTTPCrawlerError(f"HTTP client error: {str(e)}"), so the password ends up in the error text.
Is this reproducible?
Yes
Inputs Causing the Bug
ProxyConfig(server="http://host:port", username="user", password="p#ss") with AsyncHTTPCrawlerStrategy.
Steps to Reproduce
Pass the output of _format_proxy_url as proxy= to aiohttp.ClientSession.get, which is what the crawler does at async_crawler_strategy.py:2737.
Code snippets
from urllib.parse import quote
return f"{protocol}://{quote(username, safe='')}:{quote(password, safe='')}@{rest}"
(both branches). Happy to send it as a PR to develop with a test.
OS
Windows 10
Python version
3.11
- Ngôn ngữ chính
- Python
- Star
- 85.9k
- Fork
- 8.9k
- Merge trung bình
- 5 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unclecode/crawl4ai
-
[Bug]: Text after an inline <link>, <meta>, <style> or <noscript> is dropped from cleaned_html and markdownCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở🐞 Bug 🩺 Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
unclecode/crawl4ai#2416 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug]: Since 0.9.1, Linux launches chrome-headless-shell instead of ChromiumCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở🐞 Bug 🩺 Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
unclecode/crawl4ai#2382 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug]: BestFirstCrawlingStrategy fetches a full batch past max_pagesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở🐞 Bug 🩺 Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
unclecode/crawl4ai#2381 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug]: CrawlerRunConfig.clone() drops fallback_fetch_function, so deep crawls never use itCó thể đã có người làm @siva23367 đã nhận 2 ngày trước. Đang mở🐞 Bug 🩺 Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
unclecode/crawl4ai#2379 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug]: Docker memory guard reads host RAM when no container limit is set — cgroup v2 "max" defeats get_container_memory_percentCó thể đã có người làm @Battleplus đã nhận 58 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
unclecode/crawl4ai#2123 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của unclecode/crawl4ai
Issue tương tự
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
yunaremaia/proto-drift#22 ·
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
yunaremaia/memwatch#96 ·
-
bug good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
yunaremaia/ci-gate-watch#34 ·
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
yunaremaia/agent-capability-attestation#64 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
yunaremaia/agent-call-graph#43 ·
Maintainer thường phản hồi trong vòng 1 ngày