SEBWIN-449: Ensured server URL is also sanitized when not using SEB server and removed check for authentication token for Jitsi Meet.
This commit is contained in:
parent
fd2eab589c
commit
b456f0821f
1 changed files with 8 additions and 2 deletions
|
@ -89,9 +89,10 @@ namespace SafeExamBrowser.Proctoring
|
||||||
|
|
||||||
if (settings.JitsiMeet.Enabled)
|
if (settings.JitsiMeet.Enabled)
|
||||||
{
|
{
|
||||||
|
this.settings.JitsiMeet.ServerUrl = Sanitize(settings.JitsiMeet.ServerUrl);
|
||||||
|
|
||||||
start = !string.IsNullOrWhiteSpace(settings.JitsiMeet.RoomName);
|
start = !string.IsNullOrWhiteSpace(settings.JitsiMeet.RoomName);
|
||||||
start &= !string.IsNullOrWhiteSpace(settings.JitsiMeet.ServerUrl);
|
start &= !string.IsNullOrWhiteSpace(settings.JitsiMeet.ServerUrl);
|
||||||
start &= !string.IsNullOrWhiteSpace(settings.JitsiMeet.Token);
|
|
||||||
}
|
}
|
||||||
else if (settings.Zoom.Enabled)
|
else if (settings.Zoom.Enabled)
|
||||||
{
|
{
|
||||||
|
@ -117,7 +118,7 @@ namespace SafeExamBrowser.Proctoring
|
||||||
logger.Info("Proctoring instruction received.");
|
logger.Info("Proctoring instruction received.");
|
||||||
|
|
||||||
settings.JitsiMeet.RoomName = roomName;
|
settings.JitsiMeet.RoomName = roomName;
|
||||||
settings.JitsiMeet.ServerUrl = serverUrl.Replace($"{Uri.UriSchemeHttp}{Uri.SchemeDelimiter}", "").Replace($"{Uri.UriSchemeHttps}{Uri.SchemeDelimiter}", "");
|
settings.JitsiMeet.ServerUrl = Sanitize(serverUrl);
|
||||||
settings.JitsiMeet.Token = token;
|
settings.JitsiMeet.Token = token;
|
||||||
|
|
||||||
StopProctoring();
|
StopProctoring();
|
||||||
|
@ -242,5 +243,10 @@ namespace SafeExamBrowser.Proctoring
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string Sanitize(string serverUrl)
|
||||||
|
{
|
||||||
|
return serverUrl?.Replace($"{Uri.UriSchemeHttp}{Uri.SchemeDelimiter}", "").Replace($"{Uri.UriSchemeHttps}{Uri.SchemeDelimiter}", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue