dovecot-2.0: lib-storage: Log and hide invalid entries in subscr...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Sep 23 21:34:34 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/5b83114df036
changeset: 12167:5b83114df036
user: Timo Sirainen <tss at iki.fi>
date: Thu Sep 23 19:34:31 2010 +0100
description:
lib-storage: Log and hide invalid entries in subscriptions file.
diffstat:
src/lib-storage/list/subscription-file.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r ce75971127a2 -r 5b83114df036 src/lib-storage/list/subscription-file.c
--- a/src/lib-storage/list/subscription-file.c Thu Sep 23 19:25:22 2010 +0100
+++ b/src/lib-storage/list/subscription-file.c Thu Sep 23 19:34:31 2010 +0100
@@ -239,7 +239,15 @@
for (i = 0;; i++) {
line = next_line(ctx->list, ctx->path, ctx->input, &ctx->failed,
i < SUBSCRIPTION_FILE_ESTALE_RETRY_COUNT);
- if (ctx->input->stream_errno != ESTALE ||
+ if (line != NULL &&
+ !mailbox_list_is_valid_pattern(ctx->list, line)) {
+ /* we'll only get into trouble if we show this */
+ i_warning("Subscriptions file %s: "
+ "Ignoring invalid entry: %s",
+ ctx->path, line);
+ continue;
+ }
+ if (ctx->input->stream_errno != ESTALE ||
i == SUBSCRIPTION_FILE_ESTALE_RETRY_COUNT)
break;
More information about the dovecot-cvs
mailing list