fix(pargar): read login credentials from ConfigService overlay
This commit is contained in:
@@ -37,8 +37,9 @@ class PargarInboundController extends Controller
|
|||||||
|
|
||||||
[$username, $password] = $this->pargarLoginCredentials($request);
|
[$username, $password] = $this->pargarLoginCredentials($request);
|
||||||
|
|
||||||
$expectedUser = $this->normalizeCredential(trim((string) $this->Config('pargar_username')));
|
$config = app(ConfigService::class);
|
||||||
$expectedPass = $this->normalizeCredential(trim((string) $this->Config('pargar_password')));
|
$expectedUser = $this->normalizeCredential($config->getString('pargar_username'));
|
||||||
|
$expectedPass = $this->normalizeCredential($config->getString('pargar_password'));
|
||||||
|
|
||||||
if ($username !== $expectedUser || $password !== $expectedPass || $expectedUser === '') {
|
if ($username !== $expectedUser || $password !== $expectedPass || $expectedUser === '') {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|||||||
Reference in New Issue
Block a user