Project

General

Profile

Actions

Bug #2641

closed

silent fail on misspelled option name

Added by odoto almost 9 years ago. Updated almost 9 years ago.

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

Description

When an incorrect option line of the form

foobar = 42

is included in the config file, no warning or error is given.

This is potentially dangerous as an option is silently ignored if the dot character is accidentally omitted or mistyped, e.g.:

$HTTP["url"] =~ "/dangerousstuff" {
url-access-deny = ( "" )
}

Expected Behaviour

As for an unrecognised command

foobar

or a non-existent name

foo.bar = 42

the described problem should lead to a warning, or better yet an error, to avoid silent failure in case of a typo.

It also violates the BNF given in the docs Docs_Configuration.

Is this simply a bug in the syntax checker or am I missing something?

I tested with 1.4.35

Actions #1

Updated by darix almost 9 years ago

you are forgetting variables.

Actions #2

Updated by odoto almost 9 years ago

darix wrote:

you are forgetting variables.

aren't variables handled by using "var" as the module, like so:

var.foobar = 42

?

Actions #3

Updated by stbuehler almost 9 years ago

  • Status changed from New to Wontfix

If a variable name doesn't contain a dot (".") lighttpd will prepend "var." to the name, and there are no "unused variable" warnings for "var.*" variables.

This probably wasn't the best choice, but changing it now is not really an option.

Actions #4

Updated by odoto almost 9 years ago

I agree that the behaviour retrospectively doesn't seem like an ideal choice, but I can totally see how it would be quite problematic to change ;)

May I suggest to add a note about this to the documentation though?

Actions

Also available in: Atom