mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2208 reduce sessions.id length below 1000 bytes
This commit is contained in:
20
install/db/172-database.php
Normal file
20
install/db/172-database.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
|
||||
$upgrade_description = 'reduce sessions.id length to 50 chars';
|
||||
|
||||
$query = 'ALTER TABLE `'.PREFIX_TABLE.'sessions` CHANGE `id` `id` varchar(50) binary NOT NULL default \'\';';
|
||||
pwg_query($query);
|
||||
|
||||
echo "\n".$upgrade_description."\n";
|
||||
?>
|
||||
@@ -334,7 +334,7 @@ CREATE TABLE `piwigo_search` (
|
||||
|
||||
DROP TABLE IF EXISTS `piwigo_sessions`;
|
||||
CREATE TABLE `piwigo_sessions` (
|
||||
`id` varchar(255) binary NOT NULL default '',
|
||||
`id` varchar(50) binary NOT NULL default '',
|
||||
`data` mediumtext NOT NULL,
|
||||
`expiration` datetime NOT NULL default '1970-01-01 00:00:00',
|
||||
PRIMARY KEY (`id`)
|
||||
|
||||
Reference in New Issue
Block a user