From 91f2c14a77f1412da4a3cfa5b8031a42305dbc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Thu, 22 Feb 2024 17:29:17 +0100 Subject: [PATCH] SEBSP-107: Removed logging of browser URLs in metadata aggregator. --- .../ScreenProctoring/Data/MetaDataAggregator.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs index 1db5e3d7..1f7e9f57 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs @@ -24,9 +24,11 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Data private string applicationInfo; private string browserInfo; + private string browserInfoWithoutUrls; private TimeSpan elapsed; private string triggerInfo; private string urls; + private int urlCount; private string windowTitle; internal MetaData Data => new MetaData @@ -65,8 +67,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Data CaptureMouseTrigger(mouse); } - // TODO: Can only log URLs when allowed by policy in browser configuration! - logger.Debug($"Captured metadata: {applicationInfo} / {browserInfo} / {triggerInfo} / {urls} / {windowTitle}."); + logger.Debug($"Captured metadata: {applicationInfo} / {browserInfoWithoutUrls} / {triggerInfo} / {urlCount} URL(s) / {windowTitle}."); } private void CaptureApplicationData() @@ -88,7 +89,9 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Data var windows = browser.GetWindows(); browserInfo = string.Join(", ", windows.Select(w => $"{(w.IsMainWindow ? "Main" : "Additional")} Window: {w.Title} ({w.Url})")); + browserInfoWithoutUrls = string.Join(", ", windows.Select(w => $"{(w.IsMainWindow ? "Main" : "Additional")} Window: {w.Title}")); urls = string.Join(", ", windows.Select(w => w.Url)); + urlCount = windows.Count(); } private void CaptureIntervalTrigger(IntervalTrigger interval)