This commit is contained in:
jvyden 2021-11-21 22:16:53 -05:00
commit e98d98980a
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
3 changed files with 3 additions and 2 deletions

View file

@ -55,7 +55,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
if (user == null) return this.StatusCode(403, "");
string ipAddressAndName = $"{token.UserLocation}|{user.Username}";
if (DeniedAuthenticationHelper.RecentlyDenied(ipAddressAndName) || DeniedAuthenticationHelper.GetAttempts(ipAddressAndName) > 5)
if (DeniedAuthenticationHelper.RecentlyDenied(ipAddressAndName) || (DeniedAuthenticationHelper.GetAttempts(ipAddressAndName) > 3))
{
this.database.AuthenticationAttempts.RemoveRange
(this.database.AuthenticationAttempts.Include(a => a.GameToken).Where(a => a.GameToken.UserId == user.UserId));

View file

@ -34,6 +34,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
(
$"Please stay on this screen.\n" +
$"Before continuing, you must approve this session at {ServerSettings.Instance.ExternalUrl}.\n" +
$"Please keep in mind that if the session is denied you may have to wait up to 5-10 minutes to try logging in again.\n" +
$"Once approved, you may press X and continue.\n\n" +
ServerSettings.Instance.EulaText
);

View file

@ -19,7 +19,7 @@ namespace LBPUnion.ProjectLighthouse.Helpers
{
if (!IPAddressAndNameDeniedAt.TryGetValue(ipAddressAndName, out long timestamp)) return false;
return TimestampHelper.Timestamp < timestamp + 60;
return TimestampHelper.Timestamp < timestamp + 300;
}
public static void AddAttempt(string ipAddressAndName)