PHPのアップグレードから、修正必要になった

このコミットが含まれているのは:
テクニカル諏訪子 2019-02-20 15:01:45 +09:00
コミット df15e243cf
1個のファイルの変更13行の追加18行の削除

ファイルの表示

@ -33,9 +33,7 @@ class AuthController extends Controller {
->select('id')
->where('username', $u)
->where('password', $p)
->first(
'id'
);
->first();
return $check->id;
}
@ -52,9 +50,7 @@ class AuthController extends Controller {
$perm = DB::table('usr_perm_id')
->select('perm_id')
->where('user_id', $check)
->first(
'perm_id'
);
->first();
$perm = json_decode(json_encode($perm), true);
@ -389,7 +385,7 @@ class AuthController extends Controller {
if (!empty($request)) {
$checkName = DB::table('users')
->select('*')
->where('username', $request['username'])
->where('username', $request->username)
->first(
'id',
'username',
@ -397,24 +393,25 @@ class AuthController extends Controller {
'salt'
);
$checkName = json_decode(json_encode($checkName), true);
$checkPass = hash('sha256', $request['password'] . $checkName['salt']);
// $checkName = json_decode(json_encode($checkName), true);
$checkPass = hash('sha256', $request->password . $checkName->salt);
for ($round = 0; $round < 65536; $round++) {
$checkPass = hash('sha256', $checkPass . $checkName['salt']);
$checkPass = hash('sha256', $checkPass . $checkName->salt);
}
if ($checkPass === $checkName['password']) {
if ($checkPass === $checkName->password) {
return array(
'uid' => $checkName['id'],
'username' => $checkName['username'],
'rawPassword' => $request['password'],
'uid' => $checkName->id,
'username' => $checkName->username,
'rawPassword' => $request->password,
'password' => $checkPass
);
}
return array('err' => 'パスワードが違う');
}
return array();
return array('err' => 'フォームは空いた');
}
function CheckEmail($email) {
@ -557,9 +554,7 @@ class AuthController extends Controller {
->select('id', 'username', 'password')
->where('username', $request->username)
->where('password', $request->password)
->first(
'id'
);
->first();
$get = json_decode(json_encode($get), true);