相关疑难解决方法(0)

Azure AD B2C 容易受到 Open Redirect 的攻击?

我正在使用 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....
Run Code Online (Sandbox Code Playgroud)

在注销时,它会像这样导致重定向到 postLogoutRedirectUrl

https://login.microsoftonline.com/MY_TENANT/oauth2/logout?p=my_policy&post_logout_redirect_uri=https%3A%2F%2Fgoogle.com%2F

登出后重定向 URI 存在于门户的重定向 URI 中。

如果我停止浏览器并将地址栏中的 post logout uri 更改为 https%3A%2F%2Fevil.com%2F,即使此 url https://evil.com/不在允许的重定向中,重定向也会正确发生里。

为什么 AD B2C 不停止重定向?这不是对漏洞开放吗?

redirect azure logout azure-ad-b2c

5
推荐指数
1
解决办法
854
查看次数

标签 统计

azure ×1

azure-ad-b2c ×1

logout ×1

redirect ×1