Skip to content
Snippets Groups Projects

Issue #3228806: Exclude security hardened site/default

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -60,7 +60,7 @@ class HandleSecurityHardening implements EventSubscriberInterface {
@@ -60,7 +60,7 @@ class HandleSecurityHardening implements EventSubscriberInterface {
include_once $this->appRoot . '/core/includes/install.inc';
include_once $this->appRoot . '/core/includes/install.inc';
foreach (self::getProtectedFiles() as $conf_file) {
foreach (self::getProtectedFiles() as $conf_file) {
$full_path = $this->sitePath . '/' . $conf_file;
$full_path = $this->sitePath . '/' . $conf_file;
if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST | FILE_READABLE | FILE_READABLE, 'file', TRUE)) {
if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST | FILE_READABLE | FILE_WRITABLE, 'file', TRUE)) {
$permission_errors[] = $this->t("The file %file is could not be made writeable to perform the update.", ['%file' => $full_path]);
$permission_errors[] = $this->t("The file %file is could not be made writeable to perform the update.", ['%file' => $full_path]);
}
}
}
}
@@ -88,7 +88,7 @@ class HandleSecurityHardening implements EventSubscriberInterface {
@@ -88,7 +88,7 @@ class HandleSecurityHardening implements EventSubscriberInterface {
include_once $this->appRoot . '/core/includes/install.inc';
include_once $this->appRoot . '/core/includes/install.inc';
foreach (self::getProtectedFiles() as $conf_file) {
foreach (self::getProtectedFiles() as $conf_file) {
$full_path = $this->sitePath . '/' . $conf_file;
$full_path = $this->sitePath . '/' . $conf_file;
if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST | FILE_READABLE | FILE_NOT_READABLE, 'file', TRUE)) {
if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST | FILE_READABLE | FILE_NOT_WRITABLE, 'file', TRUE)) {
$permission_errors[] = $this->t("The file %file is could not be made writeable after the update.", ['%file' => $full_path]);
$permission_errors[] = $this->t("The file %file is could not be made writeable after the update.", ['%file' => $full_path]);
}
}
}
}
Loading