mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #1780 from hdrlab/patch-4
Disable ID based partial caching for all security actions
This commit is contained in:
commit
5d76048275
@ -450,7 +450,8 @@ class Security extends Controller {
|
|||||||
$tmpPage = new Page();
|
$tmpPage = new Page();
|
||||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
|
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
|
||||||
$tmpPage->URLSegment = 'Security';
|
$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 = Page_Controller::create($tmpPage);
|
||||||
$controller->init();
|
$controller->init();
|
||||||
} else {
|
} else {
|
||||||
@ -512,7 +513,8 @@ class Security extends Controller {
|
|||||||
$tmpPage = new Page();
|
$tmpPage = new Page();
|
||||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');
|
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');
|
||||||
$tmpPage->URLSegment = 'Security';
|
$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 = Page_Controller::create($tmpPage);
|
||||||
$controller->init();
|
$controller->init();
|
||||||
} else {
|
} else {
|
||||||
@ -578,7 +580,8 @@ class Security extends Controller {
|
|||||||
$tmpPage = new Page();
|
$tmpPage = new Page();
|
||||||
$tmpPage->Title = _t('Security.CHANGEPASSWORDHEADER', 'Change your password');
|
$tmpPage->Title = _t('Security.CHANGEPASSWORDHEADER', 'Change your password');
|
||||||
$tmpPage->URLSegment = 'Security';
|
$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 = Page_Controller::create($tmpPage);
|
||||||
$controller->init();
|
$controller->init();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user