diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-11-16 01:39:14 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-11-16 01:39:14 -0500 |
commit | 730c932e3c32ea43dbbb2fad51c2ebfc9219b856 (patch) | |
tree | 8ebea0201e951508853fa8051f23575a9c850b2b /src/mod_vhostdb_ldap.c | |
parent | c42b28058345ca91fb1bed5b87d7da666690e4c4 (diff) | |
download | lighttpd-git-730c932e3c32ea43dbbb2fad51c2ebfc9219b856.tar.gz |
[multiple] more forgiving config str to boolean (fixes #3036)
more consistent use of shared code config_plugin_value_tobool()
(thx tow-conf)
x-ref:
"The on/off keywords in boolean configuration options is inconsistent, which might be misleading and error-prone."
https://redmine.lighttpd.net/issues/3036
Diffstat (limited to 'src/mod_vhostdb_ldap.c')
-rw-r--r-- | src/mod_vhostdb_ldap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mod_vhostdb_ldap.c b/src/mod_vhostdb_ldap.c index 8128ed42..dada0ffc 100644 --- a/src/mod_vhostdb_ldap.c +++ b/src/mod_vhostdb_ldap.c @@ -113,8 +113,7 @@ static int mod_vhostdb_dbconf_setup (server *srv, const array *opts, void **vdat } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("ca-file"))) { if (!buffer_string_is_empty(&ds->value)) cafile = ds->value.ptr; } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("starttls"))) { - starttls = !buffer_is_equal_string(&ds->value, CONST_STR_LEN("disable")) - && !buffer_is_equal_string(&ds->value, CONST_STR_LEN("0")); + starttls = config_plugin_value_tobool((data_unset *)ds, 1); } else if (buffer_is_equal_caseless_string(&ds->key, CONST_STR_LEN("timeout"))) { timeout = strtol(ds->value.ptr, NULL, 10); } |