HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //usr/libexec/webmin/authentic-theme/login-lib.pl
#
# Authentic Theme (https://github.com/webmin/authentic-theme)
# Copyright Ilia Ross <ilia@webmin.dev>
# Licensed under MIT (https://github.com/webmin/authentic-theme/blob/master/LICENSE)
#
use strict;
use warnings;

require("$ENV{'THEME_ROOT'}/login-lib-funcs.pl");

our (%gconfig, $config_directory, $pragma_no_cache, $current_theme);
our ($miniserv, $webprefix, $bg, $textbox_attrs, $hostname);

# Use config from miniserv
$miniserv = \%miniserv::config;

# Load the theme library
load_theme_library();

# Set basic variables
$webprefix = &get_webprefix();
$bg = theme_night_mode_login() ? "nightRider" : "gainsboro";
$textbox_attrs = sub {
	my $complete = shift;
	$complete ||= $gconfig{'noremember'} ? "off" : "username";
	return "autocomplete=$complete autocorrect=off autocapitalize=none";
	};

# Check to add error handler
error_40x_handler();

# Collect theme configs
my %theme_config = (
    settings("$config_directory/$current_theme/settings.js",    'settings_'),
    settings("$config_directory/$current_theme/settings-admin", 'settings_'),
    settings("$config_directory/$current_theme/settings-root",  'settings_'));

# Get hostname
if ($theme_config{'settings_login_page_server_name'}) {
    $hostname = $theme_config{'settings_login_page_server_name'};
    }
elsif ($gconfig{'realname'}) {
    $hostname = &get_display_hostname();
    }
else {
    $hostname = get_env('server_name');
    $hostname =~ s/:\d+//g;
    $hostname = &html_escape($hostname);
    }

# Never cache
$pragma_no_cache = 1;

1;