From dce2477a4b504dda125da1a1d3cf3b03e5ae5806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Wed, 18 May 2022 09:17:08 +0200 Subject: [PATCH] SEBWIN-556: Now sending OS and SEB version information to SEB Server as early as possible. --- .editorconfig | 7 ++++--- SafeExamBrowser.Server/ServerProxy.cs | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.editorconfig b/.editorconfig index 0f2ef727..013bd172 100644 --- a/.editorconfig +++ b/.editorconfig @@ -63,10 +63,11 @@ csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion csharp_style_pattern_matching_over_as_with_null_check = true:suggestion csharp_style_prefer_not_pattern = true:suggestion csharp_style_prefer_extended_property_pattern = true:suggestion -csharp_style_var_for_built_in_types = false:silent -csharp_style_var_when_type_is_apparent = false:silent -csharp_style_var_elsewhere = false:silent +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion csharp_space_after_cast = true +csharp_space_around_binary_operators = before_and_after [*.xml] indent_style = space diff --git a/SafeExamBrowser.Server/ServerProxy.cs b/SafeExamBrowser.Server/ServerProxy.cs index ff777774..f1ac156b 100644 --- a/SafeExamBrowser.Server/ServerProxy.cs +++ b/SafeExamBrowser.Server/ServerProxy.cs @@ -146,7 +146,9 @@ namespace SafeExamBrowser.Server public ServerResponse> GetAvailableExams(string examId = default) { var authorization = ("Authorization", $"Bearer {oauth2Token}"); - var content = $"institutionId={settings.Institution}{(examId == default ? "" : $"&examId={examId}")}"; + var clientInfo = $"client_id={userInfo.GetUserName()}&seb_machine_name={systemInfo.Name}"; + var versionInfo = $"seb_os_name={systemInfo.OperatingSystemInfo}&seb_version={appConfig.ProgramInformationalVersion}"; + var content = $"institutionId={settings.Institution}&{clientInfo}&{versionInfo}{(examId == default ? "" : $"&examId={examId}")}"; var contentType = "application/x-www-form-urlencoded"; var exams = default(IList); @@ -307,9 +309,7 @@ namespace SafeExamBrowser.Server public ServerResponse SendSessionIdentifier(string identifier) { var authorization = ("Authorization", $"Bearer {oauth2Token}"); - var clientInfo = $"client_id={userInfo.GetUserName()}&seb_machine_name={systemInfo.Name}"; - var versionInfo = $"seb_os_name={systemInfo.OperatingSystemInfo}&seb_version={appConfig.ProgramInformationalVersion}"; - var content = $"examId={examId}&{clientInfo}&{versionInfo}&seb_user_session_id={identifier}"; + var content = $"examId={examId}&seb_user_session_id={identifier}"; var contentType = "application/x-www-form-urlencoded"; var token = ("SEBConnectionToken", connectionToken);