Skip to content

Commit d29287b

Browse files
angrycubaslilac
authored andcommitted
fix: remove backtick from valid password characters (#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 45862a7 commit d29287b

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

+3-3
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)