simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Mar 9 19:27:55 GMT 2020


TL;DR:
  143f8a2d kh2reg: fix Python 3 iterator bug with multiple hostnames.
  1efded20 kh2reg: stop using deprecated base64.decodestring.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2020-03-09 19:27:55

commit 143f8a2d1096e9649930ed5d909bf59433c105c4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=143f8a2d1096e9649930ed5d909bf59433c105c4;hp=bed4e12f15a4e1be0bcf1797cbf2c1ab91ba416c
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Mar 9 19:23:24 2020 +0000

    kh2reg: fix Python 3 iterator bug with multiple hostnames.
    
    A known_hosts line can have multiple comma-separated hostnames on it,
    or more usually a hostname and an IP address.
    
    In the RSA and DSA key handlers, I was making a list of the integer
    parameters of the public key by using the 'map' function, and then
    iterating over it once per hostname on the line. But in Python 3, the
    'map' function returns an iterator, not a list, so after you've
    iterated to its end once, it's empty, and iterating over it a second
    time stops immediately. As a result, the registry line for the second
    hostname was coming out empty.

 contrib/kh2reg.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 1efded20a1a66509b0a2b23c4342c96b395c6437
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1efded20a1a66509b0a2b23c4342c96b395c6437;hp=143f8a2d1096e9649930ed5d909bf59433c105c4
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Mar 9 19:27:17 2020 +0000

    kh2reg: stop using deprecated base64.decodestring.
    
    Python 3 gave me a warning that I should have been using decodebytes
    instead.

 contrib/kh2reg.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



More information about the tartarus-commits mailing list