Skip to content

Commit

Permalink
Fix Windows password generation on Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
ehankland committed Jul 7, 2015
1 parent a056d49 commit 09039cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion perfkitbenchmarker/vm_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,11 @@ def _RegisterDStatCollector(sender, parsed_flags):

def GenerateRandomWindowsPassword(password_length=PASSWORD_LENGTH):
"""Generates a password that meets Windows complexity requirements."""
special_chars = '~!$%*_-+=\\[]:.?/'
# The special characters have to be recognized by the Azure CLI as
# special characters. This greatly limits the set of characters
# that we can safetly use. See
# https://github.com/Azure/azure-xplat-cli/blob/master/lib/commands/arm/vm/vmOsProfile._js#L145
special_chars = '*!@#$%^+='
password = [
random.choice(string.ascii_letters + string.digits + special_chars)
for _ in range(password_length - 4)]
Expand Down

0 comments on commit 09039cf

Please sign in to comment.