diff options
author | Kim Alvefur <zash@zash.se> | 2021-05-28 17:09:22 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-05-28 17:09:22 +0200 |
commit | 01c869407dce484716ba1f0d9e359383c63fce6b (patch) | |
tree | 468bedca75adbfecbbbdde8808859a09ce7d54b2 /spec/scansion/pubsub_basic.scs | |
parent | 0516d963354beb4106e5d6597bf0579a7c44e596 (diff) | |
download | prosody-01c869407dce484716ba1f0d9e359383c63fce6b.tar.gz prosody-01c869407dce484716ba1f0d9e359383c63fce6b.zip |
core.portmanager: Fix race condition in initialization of SNI cert map
Under some circumstances when hosts and modules are loaded in some
certain order, entries end up missing from the SNI map. This manifests
in e.g. `curl https://localhost:5281/` giving an error about
"unrecognized name".
The `service` argument is `nil` when invoked from the "host-activated"
event, leading it to iterating over every service. And then it would not
be fetching e.g. `http_host` from the config, which explains why https
would sometimes not work due to the missing name entry.
Because when `service` is included, this limits the iteration to
matching entries, while also returning the same value as the `name` loop
variable. Because `name == service when service != nil` we can use name
instead in the body of the loop.
Diffstat (limited to 'spec/scansion/pubsub_basic.scs')
0 files changed, 0 insertions, 0 deletions