mirror of
https://github.com/v2board/v2board.git
synced 2025-04-20 16:42:37 +08:00
update: fix undefined offset
This commit is contained in:
parent
8e23e74e53
commit
59b0cb4ed9
@ -269,8 +269,11 @@ class AuthController extends Controller
|
|||||||
|
|
||||||
public function getQuickLoginUrl(Request $request)
|
public function getQuickLoginUrl(Request $request)
|
||||||
{
|
{
|
||||||
$authData = explode(':', base64_decode($request->input('auth_data')));
|
$authorization = $request->input('auth_data') ?? $request->header('authorization');
|
||||||
if (!isset($authData[0])) abort(403, __('Token error'));
|
if (!$authorization) abort(403, '未登录或登陆已过期');
|
||||||
|
|
||||||
|
$authData = explode(':', base64_decode($authorization));
|
||||||
|
if (!isset($authData[0]) || !isset($authData[1])) abort(403, __('Token error'));
|
||||||
$user = User::where('email', $authData[0])
|
$user = User::where('email', $authData[0])
|
||||||
->where('password', $authData[1])
|
->where('password', $authData[1])
|
||||||
->first();
|
->first();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user