more password-suggestion fields modernized as the others; little beautifications here and there
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -515,13 +515,7 @@ class Apache extends HttpConfigBase
|
|||||||
*/
|
*/
|
||||||
private function createStandardDirectoryEntry()
|
private function createStandardDirectoryEntry()
|
||||||
{
|
{
|
||||||
$vhosts_folder = '';
|
$vhosts_filename = $this->getCustomVhostFilename('05_froxlor_dirfix_nofcgid.conf');
|
||||||
if (is_dir(Settings::Get('system.apacheconf_vhost'))) {
|
|
||||||
$vhosts_folder = FileDir::makeCorrectDir(Settings::Get('system.apacheconf_vhost'));
|
|
||||||
} else {
|
|
||||||
$vhosts_folder = FileDir::makeCorrectDir(dirname(Settings::Get('system.apacheconf_vhost')));
|
|
||||||
}
|
|
||||||
$vhosts_filename = FileDir::makeCorrectFile($vhosts_folder . '/05_froxlor_dirfix_nofcgid.conf');
|
|
||||||
|
|
||||||
if (!isset($this->virtualhosts_data[$vhosts_filename])) {
|
if (!isset($this->virtualhosts_data[$vhosts_filename])) {
|
||||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||||
@@ -545,7 +539,7 @@ class Apache extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
$this->virtualhosts_data[$vhosts_filename] .= ' </Directory>' . "\n";
|
$this->virtualhosts_data[$vhosts_filename] .= ' </Directory>' . "\n";
|
||||||
|
|
||||||
$ocsp_cache_filename = FileDir::makeCorrectFile($vhosts_folder . '/03_froxlor_ocsp_cache.conf');
|
$ocsp_cache_filename = $this->getCustomVhostFilename('03_froxlor_ocsp_cache.conf');
|
||||||
if (Settings::Get('system.use_ssl') == '1' && Settings::Get('system.apache24') == 1) {
|
if (Settings::Get('system.use_ssl') == '1' && Settings::Get('system.apache24') == 1) {
|
||||||
$this->virtualhosts_data[$ocsp_cache_filename] = 'SSLStaplingCache ' . Settings::Get('system.apache24_ocsp_cache_path') . "\n";
|
$this->virtualhosts_data[$ocsp_cache_filename] = 'SSLStaplingCache ' . Settings::Get('system.apache24_ocsp_cache_path') . "\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -562,14 +556,7 @@ class Apache extends HttpConfigBase
|
|||||||
private function createStandardErrorHandler()
|
private function createStandardErrorHandler()
|
||||||
{
|
{
|
||||||
if (Settings::Get('defaultwebsrverrhandler.enabled') == '1' && (Settings::Get('defaultwebsrverrhandler.err401') != '' || Settings::Get('defaultwebsrverrhandler.err403') != '' || Settings::Get('defaultwebsrverrhandler.err404') != '' || Settings::Get('defaultwebsrverrhandler.err500') != '')) {
|
if (Settings::Get('defaultwebsrverrhandler.enabled') == '1' && (Settings::Get('defaultwebsrverrhandler.err401') != '' || Settings::Get('defaultwebsrverrhandler.err403') != '' || Settings::Get('defaultwebsrverrhandler.err404') != '' || Settings::Get('defaultwebsrverrhandler.err500') != '')) {
|
||||||
$vhosts_folder = '';
|
$vhosts_filename = $this->getCustomVhostFilename('05_froxlor_default_errorhandler.conf');
|
||||||
if (is_dir(Settings::Get('system.apacheconf_vhost'))) {
|
|
||||||
$vhosts_folder = FileDir::makeCorrectDir(Settings::Get('system.apacheconf_vhost'));
|
|
||||||
} else {
|
|
||||||
$vhosts_folder = FileDir::makeCorrectDir(dirname(Settings::Get('system.apacheconf_vhost')));
|
|
||||||
}
|
|
||||||
|
|
||||||
$vhosts_filename = FileDir::makeCorrectFile($vhosts_folder . '/05_froxlor_default_errorhandler.conf');
|
|
||||||
|
|
||||||
if (!isset($this->virtualhosts_data[$vhosts_filename])) {
|
if (!isset($this->virtualhosts_data[$vhosts_filename])) {
|
||||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||||
|
|||||||
@@ -202,4 +202,13 @@ class HttpConfigBase
|
|||||||
}
|
}
|
||||||
return FileDir::makeCorrectFile(Settings::Get('system.apacheconf_vhost') . '/' . $filename);
|
return FileDir::makeCorrectFile(Settings::Get('system.apacheconf_vhost') . '/' . $filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getCustomVhostFilename(string $name)
|
||||||
|
{
|
||||||
|
$vhosts_folder = FileDir::makeCorrectDir(dirname(Settings::Get('system.apacheconf_vhost')));
|
||||||
|
if (is_dir(Settings::Get('system.apacheconf_vhost'))) {
|
||||||
|
$vhosts_folder = FileDir::makeCorrectDir(Settings::Get('system.apacheconf_vhost'));
|
||||||
|
}
|
||||||
|
return FileDir::makeCorrectFile($vhosts_folder . '/' . $name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1161,14 +1161,7 @@ class Nginx extends HttpConfigBase
|
|||||||
private function createStandardErrorHandler()
|
private function createStandardErrorHandler()
|
||||||
{
|
{
|
||||||
if (Settings::Get('defaultwebsrverrhandler.enabled') == '1' && (Settings::Get('defaultwebsrverrhandler.err401') != '' || Settings::Get('defaultwebsrverrhandler.err403') != '' || Settings::Get('defaultwebsrverrhandler.err404') != '' || Settings::Get('defaultwebsrverrhandler.err500') != '')) {
|
if (Settings::Get('defaultwebsrverrhandler.enabled') == '1' && (Settings::Get('defaultwebsrverrhandler.err401') != '' || Settings::Get('defaultwebsrverrhandler.err403') != '' || Settings::Get('defaultwebsrverrhandler.err404') != '' || Settings::Get('defaultwebsrverrhandler.err500') != '')) {
|
||||||
$vhosts_folder = '';
|
$vhosts_filename = $this->getCustomVhostFilename('05_froxlor_default_errorhandler.conf');
|
||||||
if (is_dir(Settings::Get('system.apacheconf_vhost'))) {
|
|
||||||
$vhosts_folder = FileDir::makeCorrectDir(Settings::Get('system.apacheconf_vhost'));
|
|
||||||
} else {
|
|
||||||
$vhosts_folder = FileDir::makeCorrectDir(dirname(Settings::Get('system.apacheconf_vhost')));
|
|
||||||
}
|
|
||||||
|
|
||||||
$vhosts_filename = FileDir::makeCorrectFile($vhosts_folder . '/05_froxlor_default_errorhandler.conf');
|
|
||||||
|
|
||||||
if (!isset($this->nginx_data[$vhosts_filename])) {
|
if (!isset($this->nginx_data[$vhosts_filename])) {
|
||||||
$this->nginx_data[$vhosts_filename] = '';
|
$this->nginx_data[$vhosts_filename] = '';
|
||||||
|
|||||||
@@ -55,13 +55,16 @@ return [
|
|||||||
'label' => lng('login.password'),
|
'label' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'autocomplete' => 'off',
|
'autocomplete' => 'off',
|
||||||
'mandatory' => true
|
'mandatory' => true,
|
||||||
],
|
'next_to' => [
|
||||||
'directory_password_suggestion' => [
|
'directory_password_suggestion' => [
|
||||||
'label' => lng('customer.generated_pwd'),
|
'next_to_prefix' => lng('customer.generated_pwd') . ':',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
'value' => Crypt::generatePassword()
|
'value' => Crypt::generatePassword(),
|
||||||
|
'readonly' => true
|
||||||
|
]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'directory_authname' => [
|
'directory_authname' => [
|
||||||
'label' => lng('extras.htpasswdauthname'),
|
'label' => lng('extras.htpasswdauthname'),
|
||||||
|
|||||||
@@ -49,13 +49,16 @@ return [
|
|||||||
'directory_password' => [
|
'directory_password' => [
|
||||||
'label' => lng('login.password'),
|
'label' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'autocomplete' => 'off'
|
'autocomplete' => 'off',
|
||||||
],
|
'next_to' => [
|
||||||
'directory_password_suggestion' => [
|
'directory_password_suggestion' => [
|
||||||
'label' => lng('customer.generated_pwd'),
|
'next_to_prefix' => lng('customer.generated_pwd') . ':',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
'value' => Crypt::generatePassword()
|
'value' => Crypt::generatePassword(),
|
||||||
|
'readonly' => true
|
||||||
|
]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'directory_authname' => [
|
'directory_authname' => [
|
||||||
'label' => lng('extras.htpasswdauthname'),
|
'label' => lng('extras.htpasswdauthname'),
|
||||||
|
|||||||
@@ -46,14 +46,16 @@ return [
|
|||||||
'label' => lng('login.password'),
|
'label' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'autocomplete' => 'off',
|
'autocomplete' => 'off',
|
||||||
'mandatory' => true
|
'mandatory' => true,
|
||||||
],
|
'next_to' => [
|
||||||
'mysql_password_suggestion' => [
|
'mysql_password_suggestion' => [
|
||||||
'label' => lng('customer.generated_pwd'),
|
'next_to_prefix' => lng('customer.generated_pwd') . ':',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
'value' => Crypt::generatePassword(),
|
'value' => Crypt::generatePassword(),
|
||||||
'readonly' => true
|
'readonly' => true
|
||||||
|
]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'sendinfomail' => [
|
'sendinfomail' => [
|
||||||
'label' => lng('customer.sendinfomail'),
|
'label' => lng('customer.sendinfomail'),
|
||||||
|
|||||||
@@ -52,14 +52,16 @@ return [
|
|||||||
'mysql_password' => [
|
'mysql_password' => [
|
||||||
'label' => lng('changepassword.new_password_ifnotempty'),
|
'label' => lng('changepassword.new_password_ifnotempty'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'autocomplete' => 'off'
|
'autocomplete' => 'off',
|
||||||
],
|
'next_to' => [
|
||||||
'mysql_password_suggestion' => [
|
'mysql_password_suggestion' => [
|
||||||
'label' => lng('customer.generated_pwd'),
|
'next_to_prefix' => lng('customer.generated_pwd') . ':',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
'value' => Crypt::generatePassword(),
|
'value' => Crypt::generatePassword(),
|
||||||
'readonly' => true
|
'readonly' => true
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="icon">
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="icon">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
|
<path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>Please ask your provider/hoster if you think this is not correct</span>
|
<span>Please ask your provider/hoster if you have any questions.</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user