Back to Blog
Dotkernel

Implementing the new Password Hashing API from PHP 5.5 in DotKernel

In order to use the new Password Hashing functions , introduced in PHP 5.5 , and unify all password related functions , used for both admin and users, we did a major refactor of DotKernel codebase, in version 1.8.0 , starting from revision 799. See more on that matter here Since those 4 new functions are available only since PHP 5.5 , we used the Password Compatibility library. The minimum PHP version in order to run DotKernel was raised to PHP 5.3.8 .   How to apply this refactor to older Dotkernel systems
    • change table structure in order to handle future algo
>ALTER TABLE `admin` CHANGE `password` `password` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
>ALTER TABLE `user` CHANGE `password` `password` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
  • Remove from application.ini the variable settings.admin.salt = 5F6WQ9U3YT
  • apply the patch . Download
  • if you have trouble applying the patch, you can compare the files and see the log/diff in websvn
  • run the conversion script . You can find the details in the file Console/Controller.php , at line 47
  • Hope that you will not break something :-)
  • Admin passwords cannot be converted , so need to be recreated manually .