1
0
mirror of https://github.com/bitwarden/server synced 2026-01-04 09:33:40 +00:00

[BEEEP] Fix all CA2254 occurrences (#6357)

* Fix all CA2254 occurrences

* Fix tests
This commit is contained in:
Justin Baur
2025-10-20 11:34:31 -04:00
committed by GitHub
parent 43779cf2e8
commit c6f1acede9
21 changed files with 45 additions and 35 deletions

View File

@@ -268,8 +268,7 @@ public abstract class BaseRequestValidator<T> where T : class
if (_globalSettings.SelfHosted)
{
_logger.LogWarning(Constants.BypassFiltersEventId,
string.Format("Failed login attempt{0}{1}", twoFactorRequest ? ", 2FA invalid." : ".",
$" {CurrentContext.IpAddress}"));
"Failed login attempt. Is2FARequest: {Is2FARequest} IpAddress: {IpAddress}", twoFactorRequest, CurrentContext.IpAddress);
}
await Task.Delay(2000); // Delay for brute force.
@@ -299,7 +298,7 @@ public abstract class BaseRequestValidator<T> where T : class
formattedMessage = "Failed login attempt.";
break;
}
_logger.LogWarning(Constants.BypassFiltersEventId, formattedMessage);
_logger.LogWarning(Constants.BypassFiltersEventId, "{FailedLoginMessage}", formattedMessage);
}
await Task.Delay(2000); // Delay for brute force.
}

View File

@@ -240,6 +240,6 @@ public class Startup
app.UseEndpoints(endpoints => endpoints.MapDefaultControllerRoute());
// Log startup
logger.LogInformation(Constants.BypassFiltersEventId, globalSettings.ProjectName + " started.");
logger.LogInformation(Constants.BypassFiltersEventId, "{Project} started.", globalSettings.ProjectName);
}
}