Skip to content

Commit bae12e1

Browse files
authored
fix: remove backtick from valid password characters (coder#15756)
Since backticks are the PowerShell escape character, they are silently consumed. To actually use backticks, they would need to be doubled when used. This change increases the safety of generated passwords for other terraform modules that might use this value unawares.
1 parent 40624bf commit bae12e1

File tree

1 file changed

+3
-3
lines changed
  • examples/templates/azure-windows

1 file changed

+3
-3
lines changed

examples/templates/azure-windows/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ resource "random_password" "admin_password" {
6565
length = 16
6666
special = true
6767
# https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements#reference
68-
# we remove characters that require special handling in XML, as this is how we pass it to the VM
69-
# namely: <>&'"
70-
override_special = "~!@#$%^*_-+=`|\\(){}[]:;,.?/"
68+
# we remove characters that require special handling in XML, as this is how we pass it to the VM; we also remove the powershell escape character
69+
# namely: <>&'`"
70+
override_special = "~!@#$%^*_-+=|\\(){}[]:;,.?/"
7171
}
7272

7373
locals {

0 commit comments

Comments
 (0)