Project

General

Profile

Actions

Bug #2980

closed

Embedded vim command line in conf file with no comment (#) hangs server

Added by linxdev over 4 years ago. Updated over 4 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

I was cleaning up conf files and added the below line to each

# vi: set ts=2 sw=2 expandtab: #

In the last file loaded from conf.d I forgot the '#' as the first character to mark the line as a comment to the lighttpd parser. The result was that lighttpd would hang an execution, with no report to the tty or to log files.

Actions #1

Updated by gstrauss over 4 years ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.x to 1.4.55
--- a/src/configfile.c
+++ b/src/configfile.c
@@ -1130,6 +1130,13 @@ static int config_tokenizer(server *srv, tokenizer_t *t, int *token_id, buffer *
                                t->offset += 2;
                                tid = TK_FORCE_ASSIGN;
                                buffer_copy_string_len(token, CONST_STR_LEN(":="));
+                       } else {
+                               /* ERROR */
+                               log_error_write(srv, __FILE__, __LINE__, "sbsdsds",
+                                               "source:", t->source,
+                                               "line:", t->line, "pos:", t->line_pos,
+                                               "unexpected character ':'");
+                               return -1;
                        }
                        break;

Actions #2

Updated by gstrauss over 4 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom