Fix #5054: parse string to number with invariant culture.
This commit is contained in:
@ -55,7 +55,7 @@ namespace Oqtane.Infrastructure
|
||||
DeliveryMethod = SmtpDeliveryMethod.Network,
|
||||
UseDefaultCredentials = false,
|
||||
Host = settings["SMTPHost"],
|
||||
Port = int.Parse(settings["SMTPPort"]),
|
||||
Port = SharedConverter.ParseInteger(settings["SMTPPort"]),
|
||||
EnableSsl = bool.Parse(settings["SMTPSSL"])
|
||||
};
|
||||
if (settings["SMTPUsername"] != "" && settings["SMTPPassword"] != "")
|
||||
|
@ -50,7 +50,7 @@ namespace Oqtane.Infrastructure
|
||||
retention = 30; // 30 days
|
||||
if (settings.ContainsKey("LogRetention") && !string.IsNullOrEmpty(settings["LogRetention"]))
|
||||
{
|
||||
retention = int.Parse(settings["LogRetention"]);
|
||||
retention = SharedConverter.ParseInteger(settings["LogRetention"]);
|
||||
}
|
||||
try
|
||||
{
|
||||
@ -68,7 +68,7 @@ namespace Oqtane.Infrastructure
|
||||
retention = 30; // 30 days
|
||||
if (settings.ContainsKey("VisitorRetention") && !string.IsNullOrEmpty(settings["VisitorRetention"]))
|
||||
{
|
||||
retention = int.Parse(settings["VisitorRetention"]);
|
||||
retention = SharedConverter.ParseInteger(settings["VisitorRetention"]);
|
||||
}
|
||||
try
|
||||
{
|
||||
@ -85,7 +85,7 @@ namespace Oqtane.Infrastructure
|
||||
retention = 30; // 30 days
|
||||
if (settings.ContainsKey("NotificationRetention") && !string.IsNullOrEmpty(settings["NotificationRetention"]))
|
||||
{
|
||||
retention = int.Parse(settings["NotificationRetention"]);
|
||||
retention = SharedConverter.ParseInteger(settings["NotificationRetention"]);
|
||||
}
|
||||
try
|
||||
{
|
||||
@ -101,7 +101,7 @@ namespace Oqtane.Infrastructure
|
||||
retention = 30; // 30 days
|
||||
if (settings.ContainsKey("UrlMappingRetention") && !string.IsNullOrEmpty(settings["UrlMappingRetention"]))
|
||||
{
|
||||
retention = int.Parse(settings["UrlMappingRetention"]);
|
||||
retention = SharedConverter.ParseInteger(settings["UrlMappingRetention"]);
|
||||
}
|
||||
try
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ namespace Oqtane.Infrastructure
|
||||
if (userid != null && username != null)
|
||||
{
|
||||
var _users = context.RequestServices.GetService(typeof(IUserManager)) as IUserManager;
|
||||
var user = _users.GetUser(int.Parse(userid), alias.SiteId); // cached
|
||||
var user = _users.GetUser(SharedConverter.ParseInteger(userid), alias.SiteId); // cached
|
||||
if (user != null && !user.IsDeleted)
|
||||
{
|
||||
var claimsidentity = UserSecurity.CreateClaimsIdentity(alias, user);
|
||||
|
Reference in New Issue
Block a user