python / python/cpython

netrc.py strips away valid backslash characters from tokens

未關閉
#99,080 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

stdlib type-bug
主要語言
Python
星號
77.2k
分支
36k
平均合併
1 天 9 小時
30 天內合併 PR
558

描述

Bug report

Commit https://github.com/python/cpython/commit/15409c720be0503131713e3d3abc1acd0da07378 to close PR https://github.com/python/cpython/pull/26330 introduced a regression in the stdlib netrc.py that causes backslashes to be stripped out of tokens. As an example, the password extracted from the following .netrc file

machine my.host.com login user password mypass\word

will be mypassword instead of mypass\word. Same behavior would happen for login or account tokens.

Your environment

  • CPython versions tested on: >=3.11
  • PR: gh-99088

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

受影響的進入點是標準函式庫中的 netrc.py;將 commit 15409c720be0503131713e3d3abc1acd0da07378 引入的 token 解析與此處顯示的 .netrc 範例進行比較。使用該範例作為回歸檢查,確認 login、account 和 password token 保留有效的反斜線。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
authentication
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。