Skip to content

Commit 8e63872

Browse files
committed
restore: user IP update
1 parent 75c9cc3 commit 8e63872

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

GZCTF/Middlewares/PrivilegeAuthentication.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
4040
return;
4141
}
4242

43-
if (DateTimeOffset.UtcNow - user.LastVisitedUTC > TimeSpan.FromSeconds(5))
44-
{
45-
user.UpdateByHttpContext(context.HttpContext);
46-
await userManager.UpdateAsync(user);
47-
}
43+
user.UpdateByHttpContext(context.HttpContext);
44+
await userManager.UpdateAsync(user);
4845

4946
if (user.Role < RequiredPrivilege)
5047
{

0 commit comments

Comments
 (0)