correctly disabled ssl-related settings when domain update sets ssl-enbled flag to false; fixes #1241

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-03-04 16:48:35 +01:00
parent b675c84ae4
commit d8b86fc3c5

View File

@@ -1528,13 +1528,12 @@ class Domains extends ApiCommand implements ResourceEntity
// enabled ssl for the domain but no ssl ip/port is selected // enabled ssl for the domain but no ssl ip/port is selected
Response::standardError('nosslippportgiven', '', true); Response::standardError('nosslippportgiven', '', true);
} }
if (Settings::Get('system.use_ssl') == "0" || empty($ssl_ipandports)) { if (Settings::Get('system.use_ssl') == "0" || empty($ssl_ipandports) || !$sslenabled) {
$ssl_redirect = 0; $ssl_redirect = 0;
$letsencrypt = 0; $letsencrypt = 0;
$http2 = 0; $http2 = 0;
// we need this for the json_encode // act like $remove_ssl_ipandport
// if ssl is disabled or no ssl-ip/port exists $ssl_ipandports = [];
$ssl_ipandports[] = -1;
// HSTS // HSTS
$hsts_maxage = 0; $hsts_maxage = 0;