SEBWIN-702: Fixed bug with quit URL where URLs not exactly matching the quit URL would also trigger a shutdown.

This commit is contained in:
Damian Büchel 2023-04-26 15:05:23 +02:00
parent 250ddb5bc9
commit ba128bb6ac

View file

@ -150,7 +150,7 @@ namespace SafeExamBrowser.Browser.Handlers
{ {
if (quitUrlPattern == default) if (quitUrlPattern == default)
{ {
quitUrlPattern = Regex.Escape(settings.QuitUrl.TrimEnd('/')) + @"\/?"; quitUrlPattern = $"^{Regex.Escape(settings.QuitUrl.TrimEnd('/'))}/?$";
} }
isQuitUrl = Regex.IsMatch(request.Url, quitUrlPattern, RegexOptions.IgnoreCase); isQuitUrl = Regex.IsMatch(request.Url, quitUrlPattern, RegexOptions.IgnoreCase);