Skip to content

Commit 0e97079

Browse files
committed
Escape double quotes in ssh keys in user-data
Signed-off-by: Hemanth Bollamreddi <[email protected]>
1 parent eebc684 commit 0e97079

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/cidata/cidata.TEMPLATE.d/user-data

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ users:
3232
sudo: ALL=(ALL) NOPASSWD:ALL
3333
lock_passwd: true
3434
ssh-authorized-keys:
35-
{{- range $val := .SSHPubKeys}}
36-
- "{{$val}}"
37-
{{- end}}
35+
{{- range $val := .SSHPubKeys }}
36+
- {{ printf "%q" $val }}
37+
{{- end }}
3838

3939
write_files:
4040
- content: |

0 commit comments

Comments
 (0)