Commit 6eca3586 authored by Raymond Hettinger's avatar Raymond Hettinger

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.)
parent 88ba1e39
...@@ -30,8 +30,7 @@ class netrc: ...@@ -30,8 +30,7 @@ class netrc:
self.hosts = {} self.hosts = {}
self.macros = {} self.macros = {}
lexer = shlex.shlex(fp) lexer = shlex.shlex(fp)
# Allows @ in hostnames. Not a big deal... lexer.wordchars += r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
lexer.wordchars = lexer.wordchars + '.-@'
while 1: while 1:
# Look for a machine, default, or macdef top-level keyword # Look for a machine, default, or macdef top-level keyword
toplevel = tt = lexer.get_token() toplevel = tt = lexer.get_token()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment