add 'Passing HTTP AUTH BASIC' header option when using FCGID; fix typeerror in parameter for Froxlor\Dns\Dns; require php-gd extension for validating uploaded images
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -196,6 +196,9 @@ class ApacheFcgi extends Apache
|
||||
}
|
||||
} else {
|
||||
$php_options_text .= ' FcgidIdleTimeout ' . Settings::Get('system.mod_fcgid_idle_timeout') . "\n";
|
||||
if ($phpconfig['pass_authorizationheader'] == '1') {
|
||||
$php_options_text .= ' FcgidPassHeader Authorization' . "\n";
|
||||
}
|
||||
if ((int)Settings::Get('system.mod_fcgid_wrapper') == 0) {
|
||||
$php_options_text .= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n";
|
||||
$php_options_text .= ' ScriptAlias /php/ ' . $php->getInterface()->getConfigDir() . "\n";
|
||||
|
||||
@@ -279,8 +279,7 @@ class Dns
|
||||
}
|
||||
}
|
||||
}
|
||||
$zonerecords[] = new DnsEntry($entry['record'], $entry['type'], $entry['content'], $entry['prio'],
|
||||
$entry['ttl']);
|
||||
$zonerecords[] = new DnsEntry($entry['record'], $entry['type'], $entry['content'], $entry['prio'] ?? 0, $entry['ttl']);
|
||||
}
|
||||
|
||||
// add missing required entries
|
||||
|
||||
@@ -42,7 +42,7 @@ class Install
|
||||
public $phpVersion;
|
||||
public $formfield;
|
||||
public string $requiredVersion = '7.4.0';
|
||||
public array $requiredExtensions = ['session', 'ctype', 'xml', 'filter', 'posix', 'mbstring', 'curl', 'gmp', 'json'];
|
||||
public array $requiredExtensions = ['session', 'ctype', 'xml', 'filter', 'posix', 'mbstring', 'curl', 'gmp', 'json', 'gd'];
|
||||
public array $suggestedExtensions = ['bcmath', 'zip'];
|
||||
public array $suggestions = [];
|
||||
public array $criticals = [];
|
||||
|
||||
@@ -92,21 +92,11 @@ class UI
|
||||
*/
|
||||
public static function sendHeaders()
|
||||
{
|
||||
if (empty($_SERVER['HTTP_HOST'])) {
|
||||
if (!self::$install_mode) {
|
||||
// fallback to set hostname in settings
|
||||
$_SERVER['HTTP_HOST'] = Settings::Get('system.hostname');
|
||||
} else {
|
||||
// bad request
|
||||
http_response_code(400);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
$cookie_host = empty($_SERVER['HTTP_HOST']) ? null : explode (':', $_SERVER['HTTP_HOST'])[0];
|
||||
session_set_cookie_params([
|
||||
'lifetime' => self::$install_mode ? 7200 : 600, // will be renewed based on settings in lib/init.php
|
||||
'path' => '/',
|
||||
'domain' => explode(':', $_SERVER['HTTP_HOST'])[0],
|
||||
'domain' => $cookie_host,
|
||||
'secure' => self::requestIsHttps(),
|
||||
'httponly' => true,
|
||||
'samesite' => 'Strict'
|
||||
|
||||
@@ -102,7 +102,7 @@ return [
|
||||
'value' => '5s'
|
||||
],
|
||||
'phpfpm_pass_authorizationheader' => [
|
||||
'visible' => Settings::Get('phpfpm.enabled') == 1 && Settings::Get('system.webserver') == "apache2",
|
||||
'visible' => Settings::Get('system.webserver') == "apache2",
|
||||
'label' => lng('admin.phpsettings.pass_authorizationheader'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
|
||||
@@ -105,7 +105,7 @@ return [
|
||||
'value' => $result['fpm_reqslow']
|
||||
],
|
||||
'phpfpm_pass_authorizationheader' => [
|
||||
'visible' => Settings::Get('phpfpm.enabled') == 1 && Settings::Get('system.webserver') == "apache2",
|
||||
'visible' => Settings::Get('system.webserver') == "apache2",
|
||||
'label' => lng('admin.phpsettings.pass_authorizationheader'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
|
||||
@@ -329,10 +329,11 @@ if (CurrentUser::hasSession()) {
|
||||
}
|
||||
}
|
||||
// update cookie lifetime
|
||||
$cookie_host = empty($_SERVER['HTTP_HOST']) ? null : explode (':', $_SERVER['HTTP_HOST'])[0];
|
||||
$cookie_params = [
|
||||
'expires' => time() + Settings::Get('session.sessiontimeout'),
|
||||
'path' => '/',
|
||||
'domain' => explode(':', $_SERVER['HTTP_HOST'])[0],
|
||||
'domain' => $cookie_host,
|
||||
'secure' => UI::requestIsHttps(),
|
||||
'httponly' => true,
|
||||
'samesite' => 'Strict'
|
||||
|
||||
Reference in New Issue
Block a user