Permalink
Browse files

dlist: don't allow overwrite of arbitrary files

  • Loading branch information...
brong authored and elliefm committed Aug 11, 2017
1 parent ec2e5f3 commit 5edadcfb83bf27107578830801817f9e6d0ad941
Showing with 3 additions and 9 deletions.
  1. +3 −9 imap/dlist.c
View
@@ -141,16 +141,10 @@ EXPORTED const char *dlist_reserve_path(const char *part, int isarchive,
const struct message_guid *guid)
{
static char buf[MAX_MAILBOX_PATH];
const char *base;
/* part can be either a configured partition name, or a path */
if (strchr(part, '/')) {
base = part;
}
else {
base = isarchive ? config_archivepartitiondir(part)
: config_partitiondir(part);
}
/* part must be a configured partition name on this server */
const char *base = isarchive ? config_archivepartitiondir(part)
: config_partitiondir(part);
/* we expect to have a base at this point, so let's assert that */
assert(base != NULL);

0 comments on commit 5edadcf

Please sign in to comment.