mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 22:11:48 +01:00
fix exception which can be thrown if the store is not found
This commit is contained in:
parent
312c7b7193
commit
a09c6d51e6
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ namespace BTCPayServer.Security
|
|||
{
|
||||
claims.Add(new Claim(Policies.CanCreateInvoice.Key, storeId));
|
||||
var store = await _StoreRepository.FindStore(storeId);
|
||||
if (anonymous && !store.GetStoreBlob().AnyoneCanInvoice)
|
||||
if (store == null ||
|
||||
(anonymous && !store.GetStoreBlob().AnyoneCanInvoice))
|
||||
{
|
||||
return AuthenticateResult.Fail("Invalid credentials");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue