Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core
# Conflicts: # build/build.ps1 # src/Umbraco.Core/Configuration/ConfigConnectionString.cs # src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs # src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs # src/Umbraco.Core/Models/ContentType.cs # src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs # tests/Umbraco.Tests.AcceptanceTest/package.json
This commit is contained in:
@@ -201,23 +201,23 @@ namespace Umbraco.Cms.Web.Website.Routing
|
||||
throw new ArgumentNullException(nameof(httpContext));
|
||||
}
|
||||
|
||||
// if it is a POST/GET then a value must be in the request
|
||||
if ((!httpContext.Request.HasFormContentType || !httpContext.Request.Form.TryGetValue("ufprt", out StringValues encodedVal))
|
||||
&& !httpContext.Request.Query.TryGetValue("ufprt", out encodedVal))
|
||||
// if it is a POST/GET then a `ufprt` value must be in the request
|
||||
var ufprt = httpContext.Request.GetUfprt();
|
||||
if (string.IsNullOrWhiteSpace(ufprt))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!EncryptionHelper.DecryptAndValidateEncryptedRouteString(
|
||||
_dataProtectionProvider,
|
||||
encodedVal,
|
||||
out IDictionary<string, string> decodedParts))
|
||||
ufprt,
|
||||
out IDictionary<string, string> decodedUfprt))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get all route values that are not the default ones and add them separately so they eventually get to action parameters
|
||||
foreach (KeyValuePair<string, string> item in decodedParts.Where(x => ReservedAdditionalKeys.AllKeys.Contains(x.Key) == false))
|
||||
foreach (KeyValuePair<string, string> item in decodedUfprt.Where(x => ReservedAdditionalKeys.AllKeys.Contains(x.Key) == false))
|
||||
{
|
||||
values[item.Key] = item.Value;
|
||||
}
|
||||
@@ -225,9 +225,9 @@ namespace Umbraco.Cms.Web.Website.Routing
|
||||
// return the proxy info without the surface id... could be a local controller.
|
||||
return new PostedDataProxyInfo
|
||||
{
|
||||
ControllerName = WebUtility.UrlDecode(decodedParts.First(x => x.Key == ReservedAdditionalKeys.Controller).Value),
|
||||
ActionName = WebUtility.UrlDecode(decodedParts.First(x => x.Key == ReservedAdditionalKeys.Action).Value),
|
||||
Area = WebUtility.UrlDecode(decodedParts.First(x => x.Key == ReservedAdditionalKeys.Area).Value),
|
||||
ControllerName = WebUtility.UrlDecode(decodedUfprt.First(x => x.Key == ReservedAdditionalKeys.Controller).Value),
|
||||
ActionName = WebUtility.UrlDecode(decodedUfprt.First(x => x.Key == ReservedAdditionalKeys.Action).Value),
|
||||
Area = WebUtility.UrlDecode(decodedUfprt.First(x => x.Key == ReservedAdditionalKeys.Area).Value),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Umbraco.Cms.Web.Website.Security
|
||||
// Validate that the prefix is set
|
||||
if (!authenticationScheme.StartsWith(Constants.Security.MemberExternalAuthenticationTypePrefix))
|
||||
{
|
||||
throw new InvalidOperationException($"The {nameof(authenticationScheme)} is not prefixed with {Constants.Security.BackOfficeExternalAuthenticationTypePrefix}. The scheme must be created with a call to the method {nameof(SchemeForMembers)}");
|
||||
throw new InvalidOperationException($"The {nameof(authenticationScheme)} is not prefixed with {Constants.Security.MemberExternalAuthenticationTypePrefix}. The scheme must be created with a call to the method {nameof(SchemeForMembers)}");
|
||||
}
|
||||
|
||||
// add our login provider to the container along with a custom options configuration
|
||||
|
||||
Reference in New Issue
Block a user