Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent infinite loop when max_age=0 #1544

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -244,6 +244,9 @@ protected internal virtual async Task<InteractionResponse> ProcessLoginAsync(Val
var authTime = request.Subject.GetAuthenticationTime();
if (Clock.UtcNow.UtcDateTime > authTime.AddSeconds(request.MaxAge.Value))
{
// Remove the max_age parameter to prevent (infinite) loop
request.Raw.Remove("max_age");

Logger.LogInformation("Showing login: Requested MaxAge exceeded.");

return new InteractionResponse { IsLogin = true };
Expand Down