mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Disable ID based partial caching for all security actions
Disables ID based partial caching for all security actions so that actions such as Security/lostpassword and Security/passwordsent work properly even if partial caching is used.
This commit is contained in:
parent
f8ee3e1b73
commit
22f5c06fd3
@ -468,7 +468,8 @@ class Security extends Controller {
|
||||
$tmpPage = new Page();
|
||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
|
||||
$tmpPage->URLSegment = 'Security';
|
||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
||||
// Disable ID-based caching of the log-in page by making it a random number
|
||||
$tmpPage->ID = -1 * rand(1,10000000);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->init();
|
||||
} else {
|
||||
@ -530,7 +531,8 @@ class Security extends Controller {
|
||||
$tmpPage = new Page();
|
||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');
|
||||
$tmpPage->URLSegment = 'Security';
|
||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
||||
// Disable ID-based caching of the log-in page by making it a random number
|
||||
$tmpPage->ID = -1 * rand(1,10000000);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->init();
|
||||
} else {
|
||||
@ -596,7 +598,8 @@ class Security extends Controller {
|
||||
$tmpPage = new Page();
|
||||
$tmpPage->Title = _t('Security.CHANGEPASSWORDHEADER', 'Change your password');
|
||||
$tmpPage->URLSegment = 'Security';
|
||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
||||
// Disable ID-based caching of the log-in page by making it a random number
|
||||
$tmpPage->ID = -1 * rand(1,10000000);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->init();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user