feat: harden isolated Tornado test workflow

This commit is contained in:
2026-07-10 11:27:40 +09:00
parent 5a8c7028dc
commit fc932b27f6
36 changed files with 3919 additions and 226 deletions

View File

@@ -2,6 +2,7 @@ using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text.Json;
using MBN_STOCK_WEBVIEW.Core.Playout;
using MBN_STOCK_WEBVIEW.Infrastructure;
using Microsoft.UI.Windowing;
using Microsoft.Web.WebView2.Core;
@@ -126,8 +127,7 @@ public sealed partial class MainWindow : Window
return;
}
if ((uri.Scheme == Uri.UriSchemeHttps &&
uri.Host.Equals(AppHost, StringComparison.OrdinalIgnoreCase)) ||
if (PlayoutBridgeProtocol.IsTrustedSource(uri.AbsoluteUri, AppHost) ||
uri.Scheme == "about")
{
LoadingOverlay.Visibility = Visibility.Visible;
@@ -166,9 +166,7 @@ public sealed partial class MainWindow : Window
private void OnWebMessageReceived(object? sender, CoreWebView2WebMessageReceivedEventArgs args)
{
if (!Uri.TryCreate(args.Source, UriKind.Absolute, out var source) ||
source.Scheme != Uri.UriSchemeHttps ||
!source.Host.Equals(AppHost, StringComparison.OrdinalIgnoreCase))
if (!PlayoutBridgeProtocol.IsTrustedSource(args.Source, AppHost))
{
return;
}