Skip to content

Commit c9f3583

Browse files
fix: protect spam folder name (#190)
- Enclose the spam folder name in double quotes, to allow the usage of the space character. - Forbid double quotes character in spam folder name. Refs NethServer/dev#7543
1 parent b9ca411 commit c9f3583

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dovecot/usr/local/lib/templates/local.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ last_valid_gid = 101
4949

5050
namespace inbox {
5151
separator = /
52-
mailbox ${tmpl_spam_folder} {
52+
mailbox "${tmpl_spam_folder}" {
5353
special_use = \Junk
5454
auto = ${tmpl_spam_folder_auto}
5555
}
56-
mailbox ${tmpl_trash_folder} {
56+
mailbox "${tmpl_trash_folder}" {
5757
special_use = \Trash
5858
auto = subscribe
5959
}

imageroot/validator-definitions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@
458458
"name": {
459459
"type": "string",
460460
"title": "Folder name",
461-
"minLength": 1
461+
"minLength": 1,
462+
"pattern": "^[^\"]+$"
462463
}
463464
}
464465
},

0 commit comments

Comments
 (0)