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

Resolve UserProfile Loading Errors From Unsecure pages #2494

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions DNN Platform/Library/Common/Utilities/UrlUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ public static bool InPopUp()
return HttpContext.Current != null && HttpContext.Current.Request.Url.ToString().IndexOf("popUp=true", StringComparison.OrdinalIgnoreCase) >= 0;
}

public static bool IsPopUp(string url)
{
return url .IndexOf("popUp=true", StringComparison.OrdinalIgnoreCase) >= 0;
}

/// <summary>
/// Redirect current response to 404 error page or output 404 content if error page not defined.
/// </summary>
Expand Down
7 changes: 5 additions & 2 deletions DNN Platform/Library/Entities/Urls/AdvancedUrlRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1554,8 +1554,11 @@ private bool CheckForSecureRedirect(PortalSettings portalSettings,
//check ssl enforced
if (portalSettings.SSLEnforced)
{
//check page is not secure, connection is secure
if (!portalSettings.ActiveTab.IsSecure && result.IsSecureConnection)
// Prevent browser's mixed-content error in case we open a secure PopUp or a secure iframe
// from an unsecure page
if (!portalSettings.ActiveTab.IsSecure &&
result.IsSecureConnection &&
!UrlUtils.IsPopUp(url))
{
//has connection already been forced to secure?
if (queryStringCol["ssl"] == null)
Expand Down