On Wed Mar 20, 2024 at 1:45 PM CET, Wolfgang Bumiller wrote: > On Tue, Mar 19, 2024 at 04:32:49PM +0100, Max Carrara wrote: > > +@contextmanager > > +def connect_to_esxi_host(args: EsxiConnectonArgs) -> vim.ServiceInstance: > > + """Opens a connection to an ESXi host with the given username and > > password > > + contained in the password file. > > + """ > > + ssl_context = ( > > + ssl._create_unverified_context() > > + if args.skip_cert_verification > > + else None > > + ) > > + > > + with open(args.password_file) as pw_file: > > + password = pw_file.read().strip() > > This strips all whitespace from both sides, which is not what we want. > (Not that I particularly care whether esxi even allows spaces in > passwords at all...) > The old code specifically only stripped a single trailing *newline*, > mainly for when you edit the file with eg. vim which defaults to adding > one...
Oh, thanks for pointing this out - I had assumed that, well, passwords wouldn't contain spaces ... ever. Mea culpa; will fix in v2. _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
