Revision 581
Added by thorn almost 17 years ago
trunk/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 | 13 |
------------------------------------- 2.7.0 ------------------------------------- |
14 |
|
|
14 |
|
|
15 |
21-Jan-2008 Thomas Hornik |
|
16 |
+ Unique session-identifier for each website baker installation. fixes #354 |
|
15 | 17 |
20-Jan-2008 Christian Sommer |
16 | 18 |
# fixed E_NOTICE-warning in save.php when input data was wrong |
17 | 19 |
+ added the new admin tool email output filter which allows to transform |
trunk/wb/install/save.php | ||
---|---|---|
23 | 23 |
|
24 | 24 |
*/ |
25 | 25 |
|
26 |
// Start a session |
|
26 |
// Start a session
|
|
27 | 27 |
if(!defined('SESSION_STARTED')) { |
28 |
session_name('wb_session_id'); |
|
28 |
// get random-part for session_name() |
|
29 |
list($usec,$sec) = explode(' ',microtime()); |
|
30 |
srand((float)$sec+((float)$usec*100000)); |
|
31 |
$session_rand = rand(1000,9999); |
|
32 |
session_name("wb_{$session_rand}_session_id"); |
|
29 | 33 |
session_start(); |
30 |
define('SESSION_STARTED', true); |
|
31 |
} |
|
34 |
$_SESSION['SESSION_RAND'] = $session_rand; |
|
35 |
define('SESSION_STARTED', true); |
|
36 |
} else { |
|
37 |
$session_rand = $_SESSION['SESSION_RAND']; |
|
38 |
} |
|
32 | 39 |
|
33 | 40 |
// Function to set error |
34 | 41 |
function set_error($message) { |
... | ... | |
419 | 426 |
." ('rename_files_on_upload', 'php,asp,phpx,aspx')," |
420 | 427 |
." ('er_level', '')," |
421 | 428 |
." ('default_language', 'EN')," |
422 |
." ('app_name', 'wb')," |
|
429 |
." ('app_name', 'wb_$session_rand'),"
|
|
423 | 430 |
." ('default_timezone', '$default_timezone')," |
424 | 431 |
." ('default_date_format', 'M d Y')," |
425 | 432 |
." ('default_time_format', 'g:i A')," |
trunk/wb/install/index.php | ||
---|---|---|
22 | 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | 23 |
|
24 | 24 |
*/ |
25 |
|
|
25 |
|
|
26 | 26 |
// Start a session |
27 |
if(!defined('SESSION_STARTED')) { |
|
28 |
session_name('wb_session_id'); |
|
29 |
session_start(); |
|
27 |
if(!defined('SESSION_STARTED')) { |
|
28 |
// get random-part for session_name() |
|
29 |
list($usec,$sec) = explode(' ',microtime()); |
|
30 |
srand((float)$sec+((float)$usec*100000)); |
|
31 |
$session_rand = rand(1000,9999); |
|
32 |
session_name("wb_session_id"); |
|
33 |
session_start(); |
|
34 |
$_SESSION['SESSION_RAND'] = $session_rand; |
|
30 | 35 |
define('SESSION_STARTED', true); |
31 |
}
|
|
36 |
} |
|
32 | 37 |
|
33 | 38 |
// Check if the page has been reloaded |
34 | 39 |
if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') { |
Also available in: Unified diff
Unique session-identifier for each website baker installation. fixes #354