password check path
This commit is contained in:
parent
1da425219e
commit
b86aa273ee
|
@ -17,7 +17,7 @@
|
|||
<div class="p-20">
|
||||
<form class="form-horizontal m-t-20" method="post">
|
||||
|
||||
@if (System.IO.File.Exists(System.IO.Directory.GetCurrentDirectory().Split("Monitor")[0] + "settings.secure.json"))
|
||||
@if (System.IO.File.Exists(System.IO.Directory.GetCurrentDirectory().Split("Monitor")[0] + "/settings.secure.json"))
|
||||
{
|
||||
<div class="form-group">
|
||||
<div class="col-12">
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace Monitor.Pages
|
|||
{
|
||||
encryptedOldPassword = EncryptionHelper.Encrypt(OldPassword);
|
||||
|
||||
if (!Password.Equals(PasswordConfirm) || !encryptedOldPassword.Equals(PTMagicConfiguration.SecureSettings.MonitorPassword) && System.IO.File.Exists(System.IO.Directory.GetCurrentDirectory().Split("Monitor")[0] + "settings.secure.json"))
|
||||
if (!Password.Equals(PasswordConfirm) || !encryptedOldPassword.Equals(PTMagicConfiguration.SecureSettings.MonitorPassword) && System.IO.File.Exists(System.IO.Directory.GetCurrentDirectory().Split("Monitor")[0] + "/settings.secure.json"))
|
||||
{
|
||||
ValidationMessage = "Old Password wrong or new Password does not match with confirmation";
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace Monitor.Pages
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!Password.Equals(PasswordConfirm) && !System.IO.File.Exists(System.IO.Directory.GetCurrentDirectory().Split("Monitor")[0] + "settings.secure.json"))
|
||||
if (!Password.Equals(PasswordConfirm) && !System.IO.File.Exists(System.IO.Directory.GetCurrentDirectory().Split("Monitor")[0] + "/settings.secure.json"))
|
||||
{
|
||||
ValidationMessage = "New Password does not match with confirmation";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue