【发布时间】:2018-06-28 16:07:29
【问题描述】:
我正在使用 OWIN 和 OpenId 使用 Azure AD B2C 对我的 Web 应用程序的用户进行身份验证,Startup.Auth.cs 的代码如下:
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
MetadataAddress = string.Format(AadInstance, Tenant, policy),
AuthenticationType = policy,
ClientId = clientId,
Authority = authority,
PostLogoutRedirectUri = postLogoutRedirectUri,
RedirectUri = postLogoutRedirectUri,
Notifications = new OpenIdConnectAuthenticationNotifica....
在注销时,它会像这样重定向到 postLogoutRedirectUrl
注销后重定向 URI 存在于门户的重定向 Uri 中。
如果我停止浏览器并将地址栏中的注销后 uri 更改为 https%3A%2F%2Fevil.com%2F,即使此 url https://evil.com/ 不在允许的重定向 uri 中,重定向也会正确发生。
为什么 AD B2C 不停止重定向?这不是易受攻击的吗?
【问题讨论】:
-
我看不到漏洞。整个会话通过 HTTPS 运行。如果 URL 在运行过程中被修改,则要么您的应用程序受到威胁,要么用户客户端受到威胁。在这两种情况下,注销后重定向将是我最不关心的问题。
标签: azure redirect logout azure-ad-b2c