mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: remove the possibility that Director::isDev() could be recursively called when putting isDev=1 in $_GET, addressed in ticket #4978 (http://open.silverstripe.org/ticket/4978) (from r97926)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102556 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7c84bb984e
commit
37e9c9e569
@ -789,8 +789,11 @@ class Director {
|
||||
// Use ?isDev=1 to get development access on the live server
|
||||
if(isset($_GET['isDev'])) {
|
||||
if(Security::database_is_ready()) {
|
||||
if($firstTimeCheckingGetVar && !Permission::check('ADMIN')){
|
||||
BasicAuth::requireLogin("SilverStripe developer access. Use your CMS login", "ADMIN");
|
||||
}
|
||||
$_SESSION['isDev'] = $_GET['isDev'];
|
||||
if($firstTimeCheckingGetVar) $firstTimeCheckingGetVar = false;
|
||||
} else {
|
||||
if($firstTimeCheckingGetVar && DB::connection_attempted()) {
|
||||
echo "<p style=\"padding: 3px; margin: 3px; background-color: orange;
|
||||
|
Loading…
Reference in New Issue
Block a user