diff --git a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/BusinessLogics/ClientLogic.cs b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/BusinessLogics/ClientLogic.cs
index 674d93c..24f54fa 100644
--- a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/BusinessLogics/ClientLogic.cs
+++ b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/BusinessLogics/ClientLogic.cs
@@ -114,7 +114,7 @@ namespace CarpentryWorkshopBusinessLogic.BusinessLogics
{
throw new ArgumentException("Неправильно введенный email", nameof(model.Email));
}
- if (!Regex.IsMatch(model.Password, @"^^((\w+\d+\W+)|(\w+\W+\d+)|(\d+\w+\W+)|(\d+\W+\w+)|(\W+\w+\d+)|(\W+\d+\w+))[\w\d\W]*$", RegexOptions.IgnoreCase) || model.Password.Length < 10 || model.Password.Length > 50)
+ if (!Regex.IsMatch(model.Password, @"^^((\w+\d+\W+)|(\w+\W+\d+)|(\d+\w+\W+)|(\d+\W+\w+)|(\W+\w+\d+)|(\W+\d+\w+))[\w\d\W]*$", RegexOptions.IgnoreCase) || model.Password.Length < 3 || model.Password.Length > 50)
{
throw new ArgumentException("Неправильно введенный пароль", nameof(model.Password));
}
diff --git a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/CarpentryWorkshopBusinessLogic.csproj b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/CarpentryWorkshopBusinessLogic.csproj
index e5b252f..9f95c2a 100644
--- a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/CarpentryWorkshopBusinessLogic.csproj
+++ b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/CarpentryWorkshopBusinessLogic.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/AbstractMailWorker.cs b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/AbstractMailWorker.cs
index 1466d44..a0f2111 100644
--- a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/AbstractMailWorker.cs
+++ b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/AbstractMailWorker.cs
@@ -6,12 +6,12 @@ namespace CarpentryWorkshopBusinessLogic.MailWorker
{
public abstract class AbstractMailWorker
{
- protected string _mailLogin;
- protected string _mailPassword;
- protected string _smtpClientHost;
- protected int _smtpClientPort;
- protected string _popHost;
- protected int _popPort;
+ protected string _mailLogin = string.Empty;
+ protected string _mailPassword = string.Empty;
+ protected string _smtpClientHost = string.Empty;
+ protected int _smtpClientPort;
+ protected string _popHost = string.Empty;
+ protected int _popPort;
private IMessageInfoLogic _messageInfoLogic;
public AbstractMailWorker(IMessageInfoLogic messageInfoLogic)
{
diff --git a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/MailKitWorker.cs b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/MailKitWorker.cs
index 0d6a95b..00640fa 100644
--- a/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/MailKitWorker.cs
+++ b/CarpentryWorkshop/CarpentryWorkshopBusinessLogic/MailWorker/MailKitWorker.cs
@@ -69,7 +69,9 @@ namespace CarpentryWorkshopBusinessLogic.MailWorker
}
}
}
- finally
+ catch (MailKit.Security.AuthenticationException)
+ { }
+ finally
{
client.Disconnect(true);
}
diff --git a/CarpentryWorkshop/CarpentryWorkshopRestApi/appsettings.json b/CarpentryWorkshop/CarpentryWorkshopRestApi/appsettings.json
index 708cc93..b4a801c 100644
--- a/CarpentryWorkshop/CarpentryWorkshopRestApi/appsettings.json
+++ b/CarpentryWorkshop/CarpentryWorkshopRestApi/appsettings.json
@@ -2,8 +2,7 @@
"Logging": {
"LogLevel": {
"Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
+ "Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
@@ -13,5 +12,5 @@
"PopHost": "pop.gmail.com",
"PopPort": "995",
"MailLogin": "mailworker2024@gmail.com",
- "MailPassword": "qwerty!@#"
+ "MailPassword": "lab7zxcqwe"
}
diff --git a/CarpentryWorkshop/CarpentryWorkshopView/App.config b/CarpentryWorkshop/CarpentryWorkshopView/App.config
index 6c928f4..c1d1f17 100644
--- a/CarpentryWorkshop/CarpentryWorkshopView/App.config
+++ b/CarpentryWorkshop/CarpentryWorkshopView/App.config
@@ -6,6 +6,6 @@
-
+
\ No newline at end of file