Skip to content

Commit 0419432

Browse files
committed
More sanitisation of generated values for Dovecot plugin
1 parent d48f13b commit 0419432

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ansible/roles/munin-node/templates/plugins/lovelace/dovecot_maildirs.sh.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ print_maildir_config() {
88
| tail -n +2 \
99
| awk -F / '{
1010
sanitized = $2
11-
sub(/\./, "_", sanitized)
11+
gsub(/\./, "_", sanitized)
1212
print sanitized ".draw AREASTACK"
1313
print sanitized ".label " $2
1414
}'
@@ -58,7 +58,9 @@ find . \
5858
}
5959
END {
6060
for (user in total) {
61-
print user ".value " total[user]
61+
sanitized = user
62+
gsub(/\./, "_", sanitized)
63+
print sanitized ".value " total[user]
6264
}
6365
}
6466
'

0 commit comments

Comments
 (0)