Make number of PBKDF2 iterations used for deriving session secret configurable
authorOri Livneh <ori@wikimedia.org>
Sat, 28 May 2016 13:25:48 +0000 (06:25 -0700)
committerOri Livneh <ori@wikimedia.org>
Sat, 28 May 2016 14:06:30 +0000 (07:06 -0700)
commitacca48094cc7ceaf00a0452a14740c4776f5e9c6
tree6ba8b0ae4b74d75b3b465a50d17ee692e579d08e
parentb74c4b2f950e705e51627e2423a3061955e12013
Make number of PBKDF2 iterations used for deriving session secret configurable

The intent is both to allow the number of iterations to be dialed up (either as
computational power increases, or on the basis of security needs) and dialed
down for the unit tests, where hash_pbkdf2() calls account for 15-40% of wall
time. The number of iterations is stored in the session, so changing the number
of iterations does not cause existing sessions to become invalid or corrupt.
Sessions that do not have wsSessionPbkdf2Iterations set (i.e., sessions which
precede this change) are transparently upgraded.

Change-Id: I084a97487ef4147eea0f0ce0cdf4b39ca569ef52
RELEASE-NOTES-1.28
includes/DefaultSettings.php
includes/session/Session.php
tests/phpunit/phpunit.php