# HG changeset patch # User Timo Sirainen # Date 1256062350 14400 # Node ID 4a6b04c4314771edd774fdc4f74174f7e80d11b4 # Parent d7f8dbc38fd740d05fe1c811350491ede4961688 settings parser: Warn if a line has '#' character not preceded by whitespace. This should help with people trying to give '#' character in e.g. a password and wondering why it's not working. diff -r d7f8dbc38fd7 -r 4a6b04c43147 src/lib-settings/settings.c --- a/src/lib-settings/settings.c Tue Oct 20 13:21:13 2009 -0400 +++ b/src/lib-settings/settings.c Tue Oct 20 14:12:30 2009 -0400 @@ -227,6 +227,12 @@ if (*p == '\0') break; } else if (*p == '#') { + if (!IS_WHITE(p[-1])) { + i_warning("Configuration file %s line %u: " + "Ambiguous '#' character in line, treating it as comment. " + "Add a space before it to remove this warning.", + input->path, input->linenum); + } *p = '\0'; break; }