mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 16:08:38 +00:00
Pain
This commit is contained in:
parent
4017afe8c8
commit
e98d98980a
3 changed files with 3 additions and 2 deletions
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue