NAUbackup / VmBackup

XenServer simple backup script
228 stars 61 forks source link

xenapi session creation fails due to special characters in password #16

Closed davisko closed 8 years ago

davisko commented 8 years ago

Line 1337: session.xenapi.login_with_password(username, password)

This will fail if a password contains the "$" character, possibly others.

NAUbackup commented 8 years ago

Hi, we have done some testing with special characters in passwords and found that escaping the special character with a back slash seems to work.

Example for: VmBackup.py pass$word create-password-file=password1

Then use this instead: VmBackup.py pass\$word create-password-file=password1

Please try this and let us know if this works for you.

davisko commented 8 years ago

Seems simple enough. I just changed my password instead. The real issue was identifying that it was failing due to my password not being accepted. It took some time to figure this out, because the error output was generic. Thanks for the reply.

koumdros commented 8 years ago

Alternatively we could craft a password sanitation function, I think I have one in a different project, I'll dig it out and try it