mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
3d816e94df
Summary: Ref T12509. This encourages code to move away from HMAC+SHA1 by making the method name more obviously undesirable. Test Plan: `grep`, browsed around. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12509 Differential Revision: https://secure.phabricator.com/D17632
22 lines
536 B
PHP
22 lines
536 B
PHP
<?php
|
|
|
|
$table = new PhabricatorUser();
|
|
$table->openTransaction();
|
|
$conn = $table->establishConnection('w');
|
|
|
|
$sessions = queryfx_all(
|
|
$conn,
|
|
'SELECT userPHID, type, sessionKey FROM %T FOR UPDATE',
|
|
PhabricatorUser::SESSION_TABLE);
|
|
|
|
foreach ($sessions as $session) {
|
|
queryfx(
|
|
$conn,
|
|
'UPDATE %T SET sessionKey = %s WHERE userPHID = %s AND type = %s',
|
|
PhabricatorUser::SESSION_TABLE,
|
|
PhabricatorHash::weakDigest($session['sessionKey']),
|
|
$session['userPHID'],
|
|
$session['type']);
|
|
}
|
|
|
|
$table->saveTransaction();
|