Commit ac854285 authored by catch's avatar catch

Issue #2476247 by alexpott, mpdonadio: rebuild.php clears APU user cache w/o access check

parent 98056601
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
// Change the directory to the Drupal root. // Change the directory to the Drupal root.
chdir('..'); chdir('..');
// Clear the APC cache to ensure APC class loader is reset.
if (function_exists('apc_fetch')) {
apc_clear_cache('user');
}
$autoloader = require_once __DIR__ . '/vendor/autoload.php'; $autoloader = require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/includes/utility.inc'; require_once __DIR__ . '/includes/utility.inc';
...@@ -47,7 +42,13 @@ ...@@ -47,7 +42,13 @@
((REQUEST_TIME - $request->get('timestamp')) < 300) && ((REQUEST_TIME - $request->get('timestamp')) < 300) &&
($request->get('token') === Crypt::hmacBase64($request->get('timestamp'), Settings::get('hash_salt'))) ($request->get('token') === Crypt::hmacBase64($request->get('timestamp'), Settings::get('hash_salt')))
)) { )) {
// Clear the APC cache to ensure APC class loader is reset.
if (function_exists('apc_clear_cache')) {
apc_clear_cache('user');
}
if (function_exists('apcu_clear_cache')) {
apcu_clear_cache();
}
drupal_rebuild($autoloader, $request); drupal_rebuild($autoloader, $request);
drupal_set_message('Cache rebuild complete.'); drupal_set_message('Cache rebuild complete.');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment