1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

log captcha response info (#2018)

* log captcha response info

* wrap in isBot condition
This commit is contained in:
Kyle Spearrin
2022-05-26 14:33:02 -04:00
committed by GitHub
parent a788478af3
commit 810b653915
3 changed files with 8 additions and 0 deletions

View File

@ -82,6 +82,12 @@ namespace Bit.Core.IdentityServer
CustomValidatorRequestContext validatorContext)
{
var isBot = (validatorContext.CaptchaResponse?.IsBot ?? false);
if (isBot)
{
_logger.LogInformation(Constants.BypassFiltersEventId,
"Login attempt for {0} detected as a captcha bot with score {1}.",
request.UserName, validatorContext.CaptchaResponse.Score);
}
var twoFactorToken = request.Raw["TwoFactorToken"]?.ToString();
var twoFactorProvider = request.Raw["TwoFactorProvider"]?.ToString();