Skip to content

netrc.py strips away valid backslash characters from tokens #99080

Open
@stefanoboriero

Description

@stefanoboriero

Bug report

Commit 15409c7 to close PR #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions