Page 1 of 1

Bug in check_vsphere_xi.py

Posted: Thu Jan 09, 2025 5:13 pm
by triegel
Not sure if this is the correct forum to address this, so apologies in advance if not.
In working to utilize the "new" python check for VMware resources I ran into a bit of an edge case with how the check_vsphere_xi.py script handles the password value when consumed from an auth file.

Currently the password value is extracted with:

Code: Select all

password = line.split("=")[1].rstrip()
which won't properly capture the entire password if that password contains a "=" symbol. Patching this to instead be:

Code: Select all

password = line.split("=", 1)[1].rstrip()
should fix the issue.

Just wanted to pass this along, in the very least to help anyone with this very specific issue.

Re: Bug in check_vsphere_xi.py

Posted: Thu Jan 09, 2025 6:34 pm
by bbahn
Hello @trigel,

Good catch! I've made the fix for the username/password splits and will have it out in the next release (not 2024R2 as that's already into QA, but the next release).

Re: Bug in check_vsphere_xi.py

Posted: Thu Jan 09, 2025 7:04 pm
by triegel
Awesome! Thank you @bbahn!