idk
This commit is contained in:
parent
d080e573ce
commit
719dae666f
@ -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));
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DocumentFormat.OpenXml" Version="2.19.0" />
|
||||
<PackageReference Include="MailKit" Version="4.5.0" />
|
||||
<PackageReference Include="MailKit" Version="4.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="PDFsharp-MigraDoc" Version="1.50.5147" />
|
||||
</ItemGroup>
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -69,7 +69,9 @@ namespace CarpentryWorkshopBusinessLogic.MailWorker
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
catch (MailKit.Security.AuthenticationException)
|
||||
{ }
|
||||
finally
|
||||
{
|
||||
client.Disconnect(true);
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -6,6 +6,6 @@
|
||||
<add key="PopHost" value="pop.gmail.com" />
|
||||
<add key="PopPort" value="995" />
|
||||
<add key="MailLogin" value="mailworker2024@gmail.com" />
|
||||
<add key="MailPassword" value="qwerty!@#" />
|
||||
<add key="MailPassword" value="lab7zxcqwe" />
|
||||
</appSettings>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user