Project

General

Profile

Bug #2980

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

Added by linxdev 13 days ago. Updated 10 days ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
2019-09-05
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

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.

Associated revisions

Revision 06a395a9 (diff)
Added by gstrauss 11 days ago

[core] issue config error for invalid ':' (fixes #2980)

x-ref:
"Embedded vim command line in conf file with no comment (#) hangs server"
https://redmine.lighttpd.net/issues/2980

History

#1

Updated by gstrauss 13 days 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;

#2

Updated by gstrauss 10 days ago

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

Also available in: Atom