Hide MySQL config for unauthenticated users.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2026-02-08 01:08:00 +01:00
parent 9483730df7
commit 078973d862
2 changed files with 5 additions and 1 deletions

View file

@ -76,6 +76,8 @@ sub new($$$)
my $authentication = $configref->{'http_authentication_method'};
die "No 'http_authentication_method' in configuration file." unless($authentication);
$self->{'http_auth'} = $authentication;
if ($q->auth_type() && $q->auth_type() eq $authentication)
{
$self->{'user_name'} = $q->remote_user();
@ -799,7 +801,8 @@ sub display_config($)
my @key = SHOW_CONFIG;
for my $key(@key)
{
printf "<tr><td>%s</td><td>%s</td></tr>", $key, $config->{$key};
printf "<tr><td>%s</td><td>%s</td></tr>", $key, $config->{$key}
unless ($self->{'http_auth'} eq 'None' && $key =~ /^mysql/);
}
print "</table>";