for ssl-fallback-check not only check for empty value but also for existence of certificate, thx to df8oe

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-09-06 14:12:19 +02:00
parent 1eed3d1166
commit 4ad8b62576
4 changed files with 7 additions and 7 deletions

View File

@@ -188,7 +188,7 @@ class Lighttpd extends HttpConfigBase
$this->lighttpd_data[$vhost_filename] .= $this->processSpecialConfigTemplate($row_ipsandports['ssl_specialsettings'], $domain, $row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'] == '1') . "\n";
}
if ($row_ipsandports['ssl_cert_file'] == '') {
if ($row_ipsandports['ssl_cert_file'] == '' || ! file_exists($row_ipsandports['ssl_cert_file'])) {
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
// explicitly disable ssl for this vhost
@@ -555,7 +555,7 @@ class Lighttpd extends HttpConfigBase
$ssl_settings = '';
if ($ssl_vhost === true && $domain['ssl'] == '1' && (int) Settings::Get('system.use_ssl') == 1) {
if ($domain['ssl_cert_file'] == '') {
if ($domain['ssl_cert_file'] == '' || ! file_exists($domain['ssl_cert_file'])) {
$domain['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
if (! file_exists($domain['ssl_cert_file'])) {
// explicitly disable ssl for this vhost