diff --git a/forgot.cgi b/forgot.cgi index 98aefbacf..8726f5fd4 100755 --- a/forgot.cgi +++ b/forgot.cgi @@ -16,9 +16,9 @@ my $timeout = $gconfig{'passreset_timeout'} || 15; $remote_user && &error($text{'forgot_elogin'}); $ENV{'HTTPS'} eq 'ON' || $gconfig{'forgot_pass'} == 2 || &error($text{'forgot_essl'}); -$ENV{'SSL_HOST_CERT'} == 1 || +$ENV{'SSL_CN_CERT'} == 1 || &error(&text('forgot_esslhost', - &html_escape($ENV{'HTTP_HOST'} || $ENV{'SSL_HOST'}))) + &html_escape($ENV{'HTTP_HOST'} || $ENV{'SSL_CN'}))) if ($ENV{'HTTPS'} eq 'ON'); # Check that the random ID is valid diff --git a/forgot_form.cgi b/forgot_form.cgi index 12015ae3c..608cc7a76 100755 --- a/forgot_form.cgi +++ b/forgot_form.cgi @@ -15,9 +15,9 @@ $gconfig{'forgot_pass'} || &error($text{'forgot_ecannot'}); $remote_user && &error($text{'forgot_elogin'}); $ENV{'HTTPS'} eq 'ON' || $gconfig{'forgot_pass'} == 2 || &error($text{'forgot_essl'}); -$ENV{'SSL_HOST_CERT'} == 1 || +$ENV{'SSL_CN_CERT'} == 1 || &error(&text('forgot_esslhost', - &html_escape($ENV{'HTTP_HOST'} || $ENV{'SSL_HOST'}))) + &html_escape($ENV{'HTTP_HOST'} || $ENV{'SSL_CN'}))) if ($ENV{'HTTPS'} eq 'ON'); &ui_print_header(undef, $text{'forgot_title'}, "", undef, undef, 1, 1); diff --git a/forgot_send.cgi b/forgot_send.cgi index 3db41c484..a42d705c6 100755 --- a/forgot_send.cgi +++ b/forgot_send.cgi @@ -14,9 +14,9 @@ $gconfig{'forgot_pass'} || &error($text{'forgot_ecannot'}); $remote_user && &error($text{'forgot_elogin'}); $ENV{'HTTPS'} eq 'ON' || $gconfig{'forgot_pass'} == 2 || &error($text{'forgot_essl'}); -$ENV{'SSL_HOST_CERT'} == 1 || +$ENV{'SSL_CN_CERT'} == 1 || &error(&text('forgot_esslhost', - &html_escape($ENV{'HTTP_HOST'} || $ENV{'SSL_HOST'}))) + &html_escape($ENV{'HTTP_HOST'} || $ENV{'SSL_CN'}))) if ($ENV{'HTTPS'} eq 'ON'); # Lookup the Webmin user diff --git a/miniserv.pl b/miniserv.pl index aa12670ed..d994ffd57 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -942,8 +942,8 @@ while(1) { ($ssl_con, $ssl_certfile, $ssl_keyfile, - $ssl_host, - $ssl_cert_hosts) = + $ssl_cn, + $ssl_alts) = &ssl_connection_for_ip( SOCK, $ipv6fhs{$s}); print DEBUG "ssl_con returned ". @@ -2503,9 +2503,9 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) { $ENV{"HTTPS"} = $use_ssl ? "ON" : ""; $ENV{"SSL_HSTS"} = $config{"ssl_hsts"}; if ($use_ssl) { - $ENV{"SSL_HOST"} = $ssl_host; - $ENV{"SSL_HOST_CERT"} = - &ssl_hostname_match($header{'host'}, $ssl_cert_hosts); + $ENV{"SSL_CN"} = $ssl_cn; + $ENV{"SSL_CN_CERT"} = + &ssl_hostname_match($header{'host'}, $ssl_alts); } $ENV{"MINISERV_PID"} = $miniserv_main_pid; if ($use_ssl) { diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index bcc8853ca..d19292cef 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -13261,11 +13261,11 @@ if (!$def && $gconfig{'webmin_email_url'}) { # From a config option $url = $gconfig{'webmin_email_url'}; } -elsif ($ENV{'HTTP_HOST'} || $ENV{'SSL_HOST'}) { +elsif ($ENV{'HTTP_HOST'} || $ENV{'SSL_CN'}) { # From this HTTP request my $port = $ENV{'SERVER_PORT'} || 80; - my $host = $ENV{'SSL_HOST'} - ? "$ENV{'SSL_HOST'}:$port" + my $host = $ENV{'SSL_CN'} + ? "$ENV{'SSL_CN'}:$port" : $ENV{'HTTP_HOST'}; if ($host =~ s/:(\d+)$//) { $port = $1;