Fix: Do not crash when redirect url is not provided to Authorize page

This commit is contained in:
Kukks 2021-11-08 09:24:12 +01:00
parent befa436087
commit bede4a3a42

View File

@ -297,7 +297,7 @@ namespace BTCPayServer.Controllers
case "authorize":
case "confirm":
var key = command == "authorize"
? await CreateKey(viewModel, (viewModel.ApplicationIdentifier, viewModel.RedirectUrl.AbsoluteUri))
? await CreateKey(viewModel, (viewModel.ApplicationIdentifier, viewModel.RedirectUrl?.AbsoluteUri))
: await _apiKeyRepository.GetKey(viewModel.ApiKey);
if (viewModel.RedirectUrl != null)