mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Allow ping with api_secret or account token
This commit is contained in:
parent
301c36809c
commit
675f899744
@ -54,6 +54,8 @@ class ApiCheck
|
||||
if ($token && $token->user) {
|
||||
Auth::onceUsingId($token->user_id);
|
||||
Session::set('token_id', $token->id);
|
||||
} elseif ($hasApiSecret && $request->is('api/v1/ping')) {
|
||||
// do nothing: allow ping with api_secret or account token
|
||||
} else {
|
||||
sleep(ERROR_DELAY);
|
||||
$error['error'] = ['message' => 'Invalid token'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user