mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 15:39:53 +00:00
Adding bootstrap check for unique application salt value, and updating File error message
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4565 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f4172f0de3
commit
b81d297f5c
2 changed files with 10 additions and 4 deletions
|
@ -43,11 +43,19 @@ if (!defined('PHP5')) {
|
||||||
require LIBS . 'security.php';
|
require LIBS . 'security.php';
|
||||||
require LIBS . 'inflector.php';
|
require LIBS . 'inflector.php';
|
||||||
require LIBS . 'configure.php';
|
require LIBS . 'configure.php';
|
||||||
|
require LIBS . 'debugger.php';
|
||||||
$paths = Configure::getInstance();
|
$paths = Configure::getInstance();
|
||||||
Configure::store(null, 'class.paths');
|
Configure::store(null, 'class.paths');
|
||||||
Configure::load('class.paths');
|
Configure::load('class.paths');
|
||||||
|
Configure::write('debug', DEBUG);
|
||||||
/**
|
/**
|
||||||
* Enter description here...
|
* Verify that the application's salt has been changed from the default value
|
||||||
|
*/
|
||||||
|
if (CAKE_SESSION_STRING == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
|
||||||
|
trigger_error('Please change the value of CAKE_SESSION_STRING in app/config/core.php to a salt value specific to your application', E_USER_NOTICE);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the application path and request URL
|
||||||
*/
|
*/
|
||||||
if (empty($uri) && defined('BASE_URL')) {
|
if (empty($uri) && defined('BASE_URL')) {
|
||||||
$uri = setUri();
|
$uri = setUri();
|
||||||
|
@ -95,8 +103,6 @@ if (!defined('PHP5')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Configure::write('debug', DEBUG);
|
|
||||||
|
|
||||||
require CAKE . 'dispatcher.php';
|
require CAKE . 'dispatcher.php';
|
||||||
|
|
||||||
if (defined('CACHE_CHECK') && CACHE_CHECK === true) {
|
if (defined('CACHE_CHECK') && CACHE_CHECK === true) {
|
||||||
|
|
|
@ -103,7 +103,7 @@ class File extends Object{
|
||||||
function write($data, $mode = 'w') {
|
function write($data, $mode = 'w') {
|
||||||
$file = $this->getFullPath();
|
$file = $this->getFullPath();
|
||||||
if (!($handle = fopen($file, $mode))) {
|
if (!($handle = fopen($file, $mode))) {
|
||||||
print ("[File] Could not open $file with mode $mode!");
|
trigger_error("[File] Could not open {$file} with mode {$mode}!", E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue