Fixed tryParse

This commit is contained in:
Bjarke Berg
2021-09-15 13:40:08 +02:00
parent f68717c1c8
commit 39faf63f9c
45 changed files with 474 additions and 444 deletions

View File

@@ -272,7 +272,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
var result = _umbracoMapper.Map<UserDetail>(user);
//set their remaining seconds
result.SecondsUntilTimeout = HttpContext.User.GetRemainingAuthSeconds();
result.SecondsUntilTimeout = 100+ HttpContext.User.GetRemainingAuthSeconds();
return result;
}

View File

@@ -579,7 +579,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
string filter = "",
Guid? dataTypeKey = null)
{
if (int.TryParse(id, out var intId))
if (int.TryParse(id, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intId))
{
return GetPagedChildren(intId, type, pageNumber, pageSize, orderBy, orderDirection, filter);
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Mime;
@@ -898,7 +899,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
}
//if it's not an INT then we'll check for GUID
if (int.TryParse(parentId, out intParentId) == false)
if (int.TryParse(parentId, NumberStyles.Integer, CultureInfo.InvariantCulture, out intParentId) == false)
{
// if a guid then try to look up the entity
Guid idGuid;