Add HttpOnly, Secure, and Samesite session settings to config.conf (#7547)
* Add HttpOnly, Secure, and Samesite session settings to config.conf * Update upgrade_menu.php * Update upgrade.php * Update upgrade.php * Update install.php
This commit is contained in:
@@ -128,6 +128,11 @@
|
||||
$conf .= "php.dir = ".$php_dir."\n";
|
||||
$conf .= "php.bin = php\n";
|
||||
$conf .= "\n";
|
||||
$conf .= "#session settings\n";
|
||||
$conf .= "session.cookie_httponly = true\n";
|
||||
$conf .= "session.cookie_secure = true\n";
|
||||
$conf .= "session.cookie_samesite = Lax\n";
|
||||
$conf .= "\n";
|
||||
$conf .= "#cache settings\n";
|
||||
$conf .= "cache.method = file\n";
|
||||
$conf .= "cache.location = ".$cache_location."\n";
|
||||
|
||||
@@ -112,6 +112,11 @@
|
||||
$conf .= "php.dir = ".$php_dir."\n";
|
||||
$conf .= "php.bin = php\n";
|
||||
$conf .= "\n";
|
||||
$conf .= "#session settings\n";
|
||||
$conf .= "session.cookie_httponly = true\n";
|
||||
$conf .= "session.cookie_secure = true\n";
|
||||
$conf .= "session.cookie_samesite = Lax\n";
|
||||
$conf .= "\n";
|
||||
$conf .= "#cache settings\n";
|
||||
$conf .= "cache.method = file\n";
|
||||
$conf .= "cache.location = ".$cache_location."\n";
|
||||
@@ -627,7 +632,7 @@ function update_file_permissions($text, settings $settings) {
|
||||
|
||||
//skip /dev/shm directory
|
||||
if (strpos($dir, '/dev/shm') !== false) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
//execute
|
||||
@@ -709,4 +714,3 @@ function find_service_name(string $file) {
|
||||
function is_root(): bool {
|
||||
return posix_getuid() === 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -537,6 +537,11 @@ function load_config_php() {
|
||||
$conf .= "php.dir = " . PHP_BINDIR . "\n";
|
||||
$conf .= "php.bin = php\n";
|
||||
$conf .= "\n";
|
||||
$conf .= "#session settings\n";
|
||||
$conf .= "session.cookie_httponly = true\n";
|
||||
$conf .= "session.cookie_secure = true\n";
|
||||
$conf .= "session.cookie_samesite = Lax\n";
|
||||
$conf .= "\n";
|
||||
$conf .= "#cache settings\n";
|
||||
$conf .= "cache.method = file\n";
|
||||
$conf .= "cache.location = /var/cache/fusionpbx\n";
|
||||
|
||||
Reference in New Issue
Block a user