From b86aa273ee3997bc2ee5560f65affc1c82d1d08b Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Sat, 27 Feb 2021 15:05:12 +0900 Subject: [PATCH] password check path --- Monitor/Pages/SetupPassword.cshtml | 2 +- Monitor/Pages/SetupPassword.cshtml.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Monitor/Pages/SetupPassword.cshtml b/Monitor/Pages/SetupPassword.cshtml index e99989b..7561630 100644 --- a/Monitor/Pages/SetupPassword.cshtml +++ b/Monitor/Pages/SetupPassword.cshtml @@ -17,7 +17,7 @@
- @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")) {
diff --git a/Monitor/Pages/SetupPassword.cshtml.cs b/Monitor/Pages/SetupPassword.cshtml.cs index 54e75c9..8d83132 100644 --- a/Monitor/Pages/SetupPassword.cshtml.cs +++ b/Monitor/Pages/SetupPassword.cshtml.cs @@ -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"; }