Skip to content

Commit

Permalink
correctly disabled ssl-related settings when domain update sets ssl-e…
Browse files Browse the repository at this point in the history
…nbled flag to false; fixes #1241

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
  • Loading branch information
d00p committed Mar 4, 2024
1 parent b675c84 commit d8b86fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Froxlor/Api/Commands/Domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -1528,13 +1528,12 @@ public function update()
// enabled ssl for the domain but no ssl ip/port is selected
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;
$letsencrypt = 0;
$http2 = 0;
// we need this for the json_encode
// if ssl is disabled or no ssl-ip/port exists
$ssl_ipandports[] = -1;
// act like $remove_ssl_ipandport
$ssl_ipandports = [];

// HSTS
$hsts_maxage = 0;
Expand Down

0 comments on commit d8b86fc

Please sign in to comment.