pages.example.com suffix declaration causes get_tld('example.com') == 'example.com'
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- networking
研究方向
從 PublicSuffixList.get_tld 入口開始,使用 git-pages.rit.edu 這樣的後綴重現 issue 中的範例。了解公開後綴宣告如何與父網域進行比對。當 get_tld('foo.git-pages.rit.edu') 仍回傳 git-pages.rit.edu,而 get_tld('git-pages.rit.edu') 和 get_tld('rit.edu') 回傳 edu 時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
publicsuffix2 mishandles the case where, given the declaration of some public suffix, all suffixes of that suffix are seen as their own TLDs. E.g., given the declaration of git-pages.rit.edu as a public suffix, get_tld('rit.edu') returns 'rit.edu', whereas it really should return 'edu':
Python 3.7.7 (default, Mar 14 2020, 02:39:38)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from publicsuffix2 import PublicSuffixList
>>> psl = PublicSuffixList()
>>> psl.get_tld("foo.git-pages.rit.edu")
'git-pages.rit.edu' # CORRECT
>>> psl.get_tld("git-pages.rit.edu")
'git-pages.rit.edu' # WRONG, should be 'edu'
>>> psl.get_tld("rit.edu")
'rit.edu' # WRONG, should be 'edu'
>>> psl.get_tld("edu")
'edu' # CORRECT, but probably out of accident
- 主要語言
- Python
- 星號
- 30
- 分支
- 16
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aboutcode-org/python-publicsuffix2 的其他 Issue
-
codes.open is deprecated in python3.14可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 1/5 1 小時以內 新手友好度 52/100
-
難度 1/5 1 小時以內 新手友好度 55/100
-
難度 4/5 3-5 天 新手友好度 30/100
aboutcode-org/python-publicsuffix2#23 · 1 則留言 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 45/100
aboutcode-org/python-publicsuffix2#21 · 1 個 reaction ·
查看 aboutcode-org/python-publicsuffix2 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
Graphify-Labs/graphify#4860 · 1 則留言 ·
維護者通常 1 天內回覆
-
:bug: Bug
難度 2/5 1-3 小時 新手友好度 84/100
scikit-image/scikit-image#8377 ·
維護者通常 1 天內回覆
-
Ingredient import validation accepts negative nutrient values and NaN可能已有人在做 @LukeSekai 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
wger-project/wger#2564 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
apache/ponymail-foal#351 ·
-
難度 1/5 1 小時以內 新手友好度 68/100
維護者通常 4 天內回覆