mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
SF 557704: netrc module can't handle all passwords
Expanded the range of allowable characters to include ascii punctuation. Allows resource files to have a larger character set for passwords. (Idea contributed by Bram Moolenaar.)
This commit is contained in:
parent
88ba1e39ec
commit
6eca358695
1 changed files with 1 additions and 2 deletions
|
@ -30,8 +30,7 @@ class netrc:
|
|||
self.hosts = {}
|
||||
self.macros = {}
|
||||
lexer = shlex.shlex(fp)
|
||||
# Allows @ in hostnames. Not a big deal...
|
||||
lexer.wordchars = lexer.wordchars + '.-@'
|
||||
lexer.wordchars += r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
|
||||
while 1:
|
||||
# Look for a machine, default, or macdef top-level keyword
|
||||
toplevel = tt = lexer.get_token()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue