diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-12-02 23:34:31 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2019-12-02 23:34:31 (GMT) |
commit | 30afc91f5e70cf4748ffac77a419ba69ebca6f6a (patch) | |
tree | 6087265e569a60cda437f8e43e9c9f2019d27fd9 /Lib/uu.py | |
parent | 0716056c49e9505041e30386dad9b2e788f67aaf (diff) | |
download | cpython-30afc91f5e70cf4748ffac77a419ba69ebca6f6a.zip cpython-30afc91f5e70cf4748ffac77a419ba69ebca6f6a.tar.gz cpython-30afc91f5e70cf4748ffac77a419ba69ebca6f6a.tar.bz2 |
bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (GH-17418) (GH-17444)
(cherry picked from commit a62ad4730c9b575f140f24074656c0257c86a09a)
Co-authored-by: Matthew Rollings <1211162+stealthcopter@users.noreply.github.com>
Diffstat (limited to 'Lib/uu.py')
-rwxr-xr-x | Lib/uu.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -73,6 +73,13 @@ def encode(in_file, out_file, name=None, mode=None): name = '-' if mode is None: mode = 0o666 + + # + # Remove newline chars from name + # + name = name.replace('\n','\\n') + name = name.replace('\r','\\r') + # # Write the data # |