Apache „Extra directives for SSL websites“ cannot contain variables (template substitution missing)

In the Apache VirtualHost section of the Server Templates, the template text that can be added specifically for SSL VirtualHosts („Extra directives for SSL websites“) cannot use template variables such as ${DOM}, which limits its usefulness. This is contrary to expected behavior, as template substitution is working for the main directives.

This issue is caused by the directives being copied as-is without template substitution in the module feature-ssl.pl.

This issue could be fixed with code similar to the following (apologies for code quality - I do not really know Perl):

--- feature-ssl.pl.old  2021-02-20 22:14:13.075860889 +0100
+++ feature-ssl.pl.new  2021-02-20 22:26:47.016847495 +0100
@@ -1378,7 +1378,11 @@ else {
        push(@dirs, "SSLProtocol ".join(" ", "all", map { "-".$_ } @tls));
        }
 if ($tmpl->{'web_ssl'} ne 'none') {
-       push(@dirs, split(/\t+/, $tmpl->{'web_ssl'}));
+       local $ssl_dirs = $tmpl->{'web_ssl'};
+       $ssl_dirs =~ s/\t/\n/g;
+       $ssl_dirs = &substitute_domain_template($ssl_dirs, $d);
+       push(@dirs, split(/\n/, $ssl_dirs));
        }
 return @dirs;
 }
Status: 
Active
Virtualmin version: 
6.14
Webmin version: 
1.962