summaryrefslogtreecommitdiffstats
path: root/Lib/netrc.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-04-23 18:59:54 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-04-23 18:59:54 (GMT)
commit6eca358695cb8bf51a5632d5aa3a585802b77732 (patch)
tree02aea6782d6811eb5bcdf21f9449e2e33bea56ff /Lib/netrc.py
parent88ba1e39ecf32d0a2328358351fff3006a5b30b9 (diff)
downloadcpython-6eca358695cb8bf51a5632d5aa3a585802b77732.zip
cpython-6eca358695cb8bf51a5632d5aa3a585802b77732.tar.gz
cpython-6eca358695cb8bf51a5632d5aa3a585802b77732.tar.bz2
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.)
Diffstat (limited to 'Lib/netrc.py')
-rw-r--r--Lib/netrc.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/netrc.py b/Lib/netrc.py
index 316a66c..1d65dbe 100644
--- a/Lib/netrc.py
+++ b/Lib/netrc.py
@@ -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()