diff options
author | Peter Williams <peterw@ximian.com> | 2002-08-02 18:19:53 +0000 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-08-02 18:19:53 +0000 |
commit | 404015da28ac7845fdc500442aec8307c67c0f7d (patch) | |
tree | 26775c073cac59b50a836879b28c64e049f1b725 | |
parent | 8a66230fefe345ae16d2070cc151d365f2358491 (diff) | |
download | evolution-data-server-404015da28ac7845fdc500442aec8307c67c0f7d.tar.gz |
If the folder name contains the directory separator, reject it.
2002-08-01 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-store.c (create_folder): If the folder
name contains the directory separator, reject it.
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 4de414593..c1d32a908 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2002-08-01 Peter Williams <peterw@ximian.com> + + * providers/imap/camel-imap-store.c (create_folder): If the folder + name contains the directory separator, reject it. + 2002-08-02 Not Zed <NotZed@Ximian.com> * providers/local/camel-mbox-summary.c (mbox_summary_check): Clear diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index daee1cde7..2972c52f8 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1743,7 +1743,15 @@ create_folder (CamelStore *store, const char *parent_name, return NULL; if (!parent_name) parent_name = ""; - + + if (strchr (folder_name, imap_store->dir_sep)) { + camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_PATH, + _("The folder name \"%s\" is invalid because " + "it containes the character \"%c\""), + folder_name, imap_store->dir_sep); + return NULL; + } + /* check if the parent allows inferiors */ need_convert = FALSE; |