Skip to content

Commit

Permalink
Break SSL linkage when using Nginx and cloning the domain https://for…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed May 2, 2023
1 parent c787a8c commit b3b58d9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,20 @@ sub feature_validate
}

# feature_clone(&domain, &old-domain)
# This function does nothing, but needs to exist so that the ssl feature is
# preserved when cloning
# This function does almost nothing, but needs to exist so that the ssl
# feature is preserved when cloning
sub feature_clone
{
my ($d, $oldd) = @_;

# Is the linked SSL cert still valid for the new domain? If not, break the
# linkage by copying over the cert.
if ($d->{'ssl_same'} && !&virtual_server::check_domain_certificate($d->{'dom'}, $d)) {
my $oldsame = &virtual_server::get_domain($d->{'ssl_same'});
&virtual_server::break_ssl_linkage($d, $oldsame);
&virtual_server::sync_combined_ssl_cert($d);
}

return 1;
}

Expand Down

0 comments on commit b3b58d9

Please sign in to comment.