Verified Commit 311bd83d authored by Jess's avatar Jess
Browse files

fix: SA-CORE-2026-019

By: yesct
By: hestenet
By: deviantintegral
By: longwave
By: very_random_man
By: xjm
By: alexpott
By: catch
By: greggles
By: larowlan
By: poker10
By: prudloff
(cherry picked from commit 1196ce0d)
parent 9677dbba
Loading
Loading
Loading
Loading
Loading
+3
Changes for core/includes/install.core.inc: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -536,6 +536,9 @@ function install_begin_request($class_loader, &$install_state): void {
  if ($task === 'done' || (!empty($task) && \Drupal::state()->get('install_time'))) {
    throw new AlreadyInstalledException($container->get('string_translation'));
  }
  if ($install_state['interactive'] && !empty($task) && \Drupal::state()->get('install_session_token') === NULL) {
    throw new AlreadyInstalledException($container->get('string_translation'));
  }

  // Ensure that the active configuration is empty before installation starts.
  if ($install_state['config_verified'] && empty($task)) {
+13
Changes for core/modules/system/system.post_update.php: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -91,3 +91,16 @@ function system_post_update_clear_admin_compact_mode_config(): void {
  $config->clear('admin_compact_mode');
  $config->save();
}

/**
 * Mark the installation as finished on sites with incomplete install state.
 */
function system_post_update_mark_installation_finished(): void {
  $state = \Drupal::state();
  if ($state->get('install_task') !== 'done') {
    $state->set('install_task', 'done');
  }
  if (!$state->get('install_time')) {
    $state->set('install_time', \Drupal::time()->getRequestTime());
  }
}