Skip to content

Conversation

@adamint
Copy link
Member

@adamint adamint commented Jul 30, 2024

Looping in a wider range of reviewers because this is modifying a sensitive code path. Fixes #3775 by redirecting if the requested path equals /login and auth mode is not token, including when the token query parameter (t) is not included in the URL.

demo, token auth NOT enabled:

Screen.Recording.2024-07-30.at.3.30.58.PM.mov

demo, token auth enabled (login page still shows and works as normal)

Screen.Recording.2024-07-30.at.3.35.34.PM.mov
Microsoft Reviewers: Open in CodeFlow

Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test please. Can either be an integration test or you could test the middleware on its own.

@dotnet-policy-service dotnet-policy-service bot added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jul 30, 2024
@adamint adamint requested a review from JamesNK July 31, 2024 15:54
@adamint
Copy link
Member Author

adamint commented Jul 31, 2024

Test please. Can either be an integration test or you could test the middleware on its own.

Tested middleware in isolation

https://github.com/dotnet/aspire/pull/5123/files#diff-7a2aaaa04e1d12692092b7e6f57a966eb5450d85638bce7c0158ed615c93bad1

@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Jul 31, 2024
@adamint
Copy link
Member Author

adamint commented Aug 1, 2024

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adamint
Copy link
Member Author

adamint commented Aug 2, 2024

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adamint
Copy link
Member Author

adamint commented Aug 2, 2024

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adamint adamint merged commit 0a3e89d into dotnet:main Aug 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Token login page should redirect to root if token auth is not configured

2 participants