Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #5371 Make Piwik work PHP session hash function is non default …
…such as sha1 or sha512 or other id is now VARCHAR field Tested with: session.hash_function = sha256 Had to use VARCHAR as the session id can be 128 chars eg. ``` $ php -r "var_dump(hash('sha512','test'));" string(128) "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff" ```
- Loading branch information
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
* | ||
*/ | ||
namespace Piwik\Updates; | ||
|
||
use Piwik\Common; | ||
use Piwik\Updater; | ||
use Piwik\Updates; | ||
|
||
class Updates_2_4_0_b8 extends Updates | ||
{ | ||
static function getSql() | ||
{ | ||
return array( | ||
"ALTER TABLE `" . Common::prefixTable('session') | ||
. "` CHANGE `id` `id` VARCHAR( 255 ) NOT NULL " => false, | ||
); | ||
} | ||
|
||
static function update() | ||
{ | ||
Updater::updateDatabase(__FILE__, self::getSql()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters