From 2ef7c2c5ec366ef1d2ea7ae02e0966a0cd01a4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Wed, 11 Oct 2023 15:50:17 +0200 Subject: [PATCH] SEBWIN-759, #606: Fixed bug in cursor path verification. --- .../Operations/SessionIntegrityOperation.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs b/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs index defbf1f5..30224b7f 100644 --- a/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs @@ -66,7 +66,7 @@ namespace SafeExamBrowser.Runtime.Operations private bool VerifyCursorConfiguration() { var success = true; - var systemPath = $@"{Environment.ExpandEnvironmentVariables("%SystemRoot%")}\cursors\"; + var systemPath = $@"{Environment.ExpandEnvironmentVariables("%SystemRoot%")}\Cursors\"; logger.Info($"Attempting to verify cursor configuration..."); @@ -75,7 +75,7 @@ namespace SafeExamBrowser.Runtime.Operations foreach (var cursor in cursors.Where(c => !string.IsNullOrWhiteSpace(c))) { success &= registry.TryRead(RegistryValue.UserHive.Cursors_Key, cursor, out var value); - success &= value == default || !(value is string) || (value is string path && (string.IsNullOrWhiteSpace(path) || path.StartsWith(systemPath))); + success &= value == default || !(value is string) || (value is string path && (string.IsNullOrWhiteSpace(path) || path.StartsWith(systemPath, StringComparison.OrdinalIgnoreCase))); if (!success) {