Skip to content

Commit

Permalink
Merge branch 'develop' into release/10.0.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	DNN Platform/Tests/DotNetNuke.Tests.Integration/packages.config
#	yarn.lock
  • Loading branch information
bdukes committed May 21, 2024
2 parents ebfda63 + 1e04695 commit b8fec6a
Show file tree
Hide file tree
Showing 27 changed files with 604 additions and 509 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ body:
**NOTE:** _If your version is not listed, please upgrade to the latest version. If you cannot upgrade at this time, please open a [Discussion](https://github.com/dnnsoftware/Dnn.Platform/discussions) instead._
multiple: true
options:
- 9.13.2 (latest release)
- 9.13.3 (alpha)
- 9.13.3 (latest release)
- 9.13.4 (alpha)
- 10.0.0 (alpha)
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/open-merged-pr-to-future.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: peterjgrainger/action-create-branch@v2.4.0
- uses: peterjgrainger/action-create-branch@v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
6 changes: 3 additions & 3 deletions Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<PackageReference Include="Cake.BuildSystems.Module" Version="7.0.0" />
<PackageReference Include="Cake.FileHelpers" Version="7.0.0" />
<PackageReference Include="Cake.Frosting" Version="4.0.0" />
<PackageReference Include="Cake.Git" Version="3.0.0" />
<PackageReference Include="Cake.Issues" Version="4.1.0" />
<PackageReference Include="Cake.Issues.MsBuild" Version="4.1.0" />
<PackageReference Include="Cake.Frosting.Git" Version="4.0.0" />
<PackageReference Include="Cake.Issues" Version="4.3.1" />
<PackageReference Include="Cake.Frosting.Issues.MsBuild" Version="4.3.0" />
<PackageReference Include="Cake.Json" Version="7.0.1" />
<PackageReference Include="Cake.XdtTransform" Version="2.0.0" />
<PackageReference Include="Dnn.CakeUtils" Version="2.0.2" />
Expand Down
4 changes: 2 additions & 2 deletions DNN Platform/DotNetNuke.Web.Mvc/MvcHttpModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace DotNetNuke.Web.Mvc

public class MvcHttpModule : IHttpModule
{
public static readonly Regex MvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled);
public static readonly Regex MvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled | RegexOptions.IgnoreCase);

static MvcHttpModule()
{
Expand All @@ -47,7 +47,7 @@ public void Dispose()
private static void InitDnn(object sender, EventArgs e)
{
var app = sender as HttpApplication;
if (app != null && MvcServicePath.IsMatch(app.Context.Request.RawUrl.ToLowerInvariant()))
if (app != null && MvcServicePath.IsMatch(app.Context.Request.RawUrl))
{
Initialize.Init(app);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace DotNetNuke.Web.InternalServices
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Data;
using DotNetNuke.Entities.Controllers;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Definitions;
using DotNetNuke.Entities.Tabs;
Expand All @@ -37,7 +38,6 @@ public class SearchServiceController : DnnApiController
private const string ModuleTitleCacheKey = "SearchModuleTabTitle_{0}";
private const CacheItemPriority ModuleTitleCachePriority = CacheItemPriority.Normal;
private const int ModuleTitleCacheTimeOut = 20;

private static readonly Regex GroupedBasicViewRegex = new Regex("userid(/|\\|=)(\\d+)", RegexOptions.IgnoreCase | RegexOptions.Compiled);

private readonly ISearchController searchController;
Expand Down Expand Up @@ -128,13 +128,19 @@ public HttpResponseMessage Search(string search, string culture, int pageIndex,
var moduleDefids = GetSearchModuleDefIds(settings, contentSources);
var portalIds = this.GetSearchPortalIds(settings, -1);
var userSearchTypeId = SearchHelper.Instance.GetSearchTypeByName("user").SearchTypeId;
var maximumPageSize = HostController.Instance.GetInteger("Search_MaxResultPerPage", 100);

var more = false;
var totalHits = 0;
var results = new List<GroupedDetailView>();
if (portalIds.Any() && searchTypeIds.Any() &&
(!string.IsNullOrEmpty(cleanedKeywords) || tags.Any()))
{
if (pageSize > maximumPageSize)
{
pageSize = maximumPageSize;
}

var query = new SearchQuery
{
KeyWords = cleanedKeywords,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace DotNetNuke.HttpModules
public class MobileRedirectModule : IHttpModule
{
private readonly IList<string> specialPages = new List<string> { "/login.aspx", "/register.aspx", "/terms.aspx", "/privacy.aspx", "/login", "/register", "/terms", "/privacy" };
private readonly Regex mvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled);
private readonly Regex mvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private IRedirectionController redirectionController;

public string ModuleName => "MobileRedirectModule";
Expand Down
4 changes: 2 additions & 2 deletions DNN Platform/JavaScript Libraries/jQueryUI/jQueryUI.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="jQuery-UI" type="JavaScript_Library" version="01.13.02" isSystem="true">
<package name="jQuery-UI" type="JavaScript_Library" version="01.13.03" isSystem="true">
<friendlyName>jQueryUI JavaScript Library</friendlyName>
<description>jQueryUI is a JavaScript library that is used to extend jQuery to provide UI widgets.</description>
<iconFile>Icons\Sigma\Extensions_32x32_Standard.png</iconFile>
Expand All @@ -21,7 +21,7 @@
<javaScriptLibrary>
<libraryName>jQuery-UI</libraryName>
<fileName>jquery-ui.min.js</fileName>
<CDNPath>https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js</CDNPath>
<CDNPath>https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.3/jquery-ui.min.js</CDNPath>
</javaScriptLibrary>
</component>
<component type="JavaScriptFile">
Expand Down
8 changes: 4 additions & 4 deletions DNN Platform/JavaScript Libraries/jQueryUI/jquery-ui.min.js

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions DNN Platform/Library/Entities/Users/UserInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ namespace DotNetNuke.Entities.Users
public class UserInfo : BaseEntityInfo, IPropertyAccess, IUserInfo
{
private readonly ConcurrentDictionary<int, UserSocial> social = new ConcurrentDictionary<int, UserSocial>();
private readonly ConcurrentDictionary<int, string[]> roles = new ConcurrentDictionary<int, string[]>();
private string administratorRoleName;
private UserMembership membership;
private UserProfile profile;
private string[] roles;

/// <summary>Initializes a new instance of the <see cref="UserInfo"/> class.</summary>
public UserInfo()
Expand Down Expand Up @@ -206,26 +206,24 @@ public string[] Roles
{
get
{
if (this.roles == null)
return this.roles.GetOrAdd(this.PortalID, i =>
{
var socialRoles = this.Social.Roles;
if (socialRoles.Count == 0)
{
this.roles = new string[0];
return new string[0];
}
else
{
this.roles = (from r in this.Social.Roles
where
r.Status == RoleStatus.Approved &&
(r.EffectiveDate < DateTime.Now || Null.IsNull(r.EffectiveDate)) &&
(r.ExpiryDate > DateTime.Now || Null.IsNull(r.ExpiryDate))
select r.RoleName)
return (from r in this.Social.Roles
where
r.Status == RoleStatus.Approved &&
(r.EffectiveDate < DateTime.Now || Null.IsNull(r.EffectiveDate)) &&
(r.ExpiryDate > DateTime.Now || Null.IsNull(r.ExpiryDate))
select r.RoleName)
.ToArray();
}
}

return this.roles;
});
}

set
Expand Down
6 changes: 3 additions & 3 deletions DNN Platform/Library/Framework/SecurityPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ public static string Permissions
string strPermissions = string.Empty;
if (HasReflectionPermission())
{
strPermissions += ", " + reflectionPermission;
strPermissions += ", " + ReflectionPermission;
}

if (HasWebPermission())
{
strPermissions += ", " + webPermission;
strPermissions += ", " + WebPermission;
}

if (HasAspNetHostingPermission())
{
strPermissions += ", " + aspNetHostingPermission;
strPermissions += ", " + AspNetHostingPermission;
}

if (!string.IsNullOrEmpty(strPermissions))
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Library/Framework/jQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public partial class jQuery
/// </remarks>
public const string DefaultHostedUrl = "https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js";

public const string DefaultUIHostedUrl = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js";
public const string DefaultUIHostedUrl = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.3/jquery-ui.min.js";
private const string JQueryDebugFile = "~/Resources/Shared/Scripts/jquery/jquery.js";
private const string JQueryMinFile = "~/Resources/Shared/Scripts/jquery/jquery.min.js";
private const string JQueryMigrateDebugFile = "~/Resources/Shared/Scripts/jquery/jquery-migrate.js";
Expand Down
6 changes: 5 additions & 1 deletion DNN Platform/Library/Services/FileSystem/FolderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace DotNetNuke.Services.FileSystem
using DotNetNuke.ComponentModel;
using DotNetNuke.Data;
using DotNetNuke.Entities;
using DotNetNuke.Entities.Host;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Users;
using DotNetNuke.Instrumentation;
Expand Down Expand Up @@ -913,7 +914,10 @@ internal void ClearFolderProviderCachedLists(int portalId)
{
var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType);

if (folderMapping.MappingName != "Standard" && folderMapping.MappingName != "Secure" && folderMapping.MappingName != "Database")
if (folderMapping.MappingName != "Standard" &&
folderMapping.MappingName != "Secure" &&
folderMapping.MappingName != "Database" &&
Host.EnableFileAutoSync)
{
var type = folderProvider.GetType();
MethodInfo method = type.GetMethod("ClearCache");
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Library/UI/FavIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static string GetHeaderLink(int portalId)
string favIconPath = new FavIcon(portalId).GetRelativeUrl();
if (!string.IsNullOrEmpty(favIconPath))
{
headerLink = string.Format("<link rel='SHORTCUT ICON' href='{0}' type='image/x-icon' />", favIconPath);
headerLink = string.Format("<link rel='icon' href='{0}' type='image/x-icon' />", favIconPath);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoFixture, Version=4.18.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\AutoFixture.4.18.0\lib\net452\AutoFixture.dll</HintPath>
<Reference Include="AutoFixture, Version=4.18.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f">
<HintPath>..\..\..\packages\AutoFixture.4.18.1\lib\net452\AutoFixture.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll</HintPath>
Expand All @@ -84,8 +85,9 @@
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NSubstitute, Version=5.0.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\NSubstitute.5.0.0\lib\net462\NSubstitute.dll</HintPath>
<Reference Include="NSubstitute, Version=5.1.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca">
<HintPath>..\..\..\packages\NSubstitute.5.1.0\lib\net462\NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\NUnit.3.13.3\lib\net45\nunit.framework.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoFixture" version="4.18.0" targetFramework="net48" />
<package id="AutoFixture" version="4.18.1" targetFramework="net48" />
<package id="Castle.Core" version="5.1.1" targetFramework="net48" />
<package id="Fare" version="2.2.1" targetFramework="net48" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.9" targetFramework="net48" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.9" targetFramework="net48" />
<package id="Microsoft.NETFramework.ReferenceAssemblies" version="1.0.3" targetFramework="net48" developmentDependency="true" />
<package id="Microsoft.NETFramework.ReferenceAssemblies.net48" version="1.0.3" targetFramework="net48" developmentDependency="true" />
<package id="Microsoft.NETFramework.ReferenceAssemblies.net472" version="1.0.3" targetFramework="net48" developmentDependency="true" />
<package id="Moq" version="4.18.4" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
<package id="NSubstitute" version="5.0.0" targetFramework="net48" />
<package id="NSubstitute" version="5.1.0" targetFramework="net48" />
<package id="NUnit" version="3.13.3" targetFramework="net48" />
<package id="NUnit3TestAdapter" version="4.5.0" targetFramework="net48" />
<package id="PetaPoco.Compiled" version="6.0.524" targetFramework="net48" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>

<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591,SA0001</NoWarn>
</PropertyGroup>

<ItemGroup>
<Using Include="DotNetNuke.Internal.SourceGenerators" />
<Using Include="Microsoft.CodeAnalysis" />
<Using Include="Microsoft.CodeAnalysis.CSharp" />
<Using Include="NUnit.Framework" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.6.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Verify.NUnit" Version="20.5.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\DotNetNuke.Internal.SourceGenerators\DotNetNuke.Internal.SourceGenerators.csproj" />
<ProjectReference Include="..\..\DotNetNuke.Abstractions\DotNetNuke.Abstractions.csproj" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>

<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591,SA0001</NoWarn>
</PropertyGroup>

<ItemGroup>
<Using Include="DotNetNuke.Internal.SourceGenerators" />
<Using Include="Microsoft.CodeAnalysis" />
<Using Include="Microsoft.CodeAnalysis.CSharp" />
<Using Include="NUnit.Framework" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.6.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Verify.NUnit" Version="20.5.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\DotNetNuke.Internal.SourceGenerators\DotNetNuke.Internal.SourceGenerators.csproj" />
<ProjectReference Include="..\..\DotNetNuke.Abstractions\DotNetNuke.Abstractions.csproj" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/ambiance.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.13.3/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.3/themes/smoothness/jquery-ui.css">
<script src="../../lib/codemirror.js"></script>
<script src="../xml/xml.js"></script>
<script src="../htmlembedded/htmlembedded.js"></script>
Expand Down
Loading

0 comments on commit b8fec6a

Please sign in to comment.