diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-22 02:42:16 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-29 03:10:21 -0500 |
commit | 33e400b4298b14d5f195baff5ecb1ad61662e6ed (patch) | |
tree | ed39bf6898b1752ce9bd08c451c22a4bc83b8707 /src/mod_auth.c | |
parent | 81e4f4c4a7ce25ba6173d7020b20140559f8ad01 (diff) | |
download | lighttpd-git-33e400b4298b14d5f195baff5ecb1ad61662e6ed.tar.gz |
[multiple] avoid duplicate parsing in trigger func (#3056)
x-ref:
"OCSP Stapling reload seems not to work"
https://redmine.lighttpd.net/issues/3056
Diffstat (limited to 'src/mod_auth.c')
-rw-r--r-- | src/mod_auth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_auth.c b/src/mod_auth.c index 6733e967..d1a4f243 100644 --- a/src/mod_auth.c +++ b/src/mod_auth.c @@ -183,7 +183,9 @@ TRIGGER_FUNC(mod_auth_periodic) /* future: might construct array of (http_auth_cache *) at startup * to avoid the need to search for them here */ - for (int i = 0, used = p->nconfig; i < used; ++i) { + /* (init i to 0 if global context; to 1 to skip empty global context) */ + if (NULL == p->cvlist) return HANDLER_GO_ON; + for (int i = !p->cvlist[0].v.u2[1], used = p->nconfig; i < used; ++i) { const config_plugin_value_t *cpv = p->cvlist + p->cvlist[i].v.u2[0]; for (; cpv->k_id != -1; ++cpv) { if (cpv->k_id != 3) continue; /* k_id == 3 for auth.cache */ |