diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index 71e3edecc..fa193a21a 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -794,8 +794,7 @@ class _DesktopHomePageState extends State rustDeskWinManager.setMethodHandler((call, fromWindowId) async { if (!isChattyMethod(call.method)) { - debugPrint( - "[Main] call ${call.method} with args ${call.arguments} from window $fromWindowId"); + debugPrint("[Main] call ${call.method} from window $fromWindowId"); } if (call.method == kWindowMainWindowOnTop) { windowOnTop(null); diff --git a/flutter/lib/desktop/pages/file_manager_tab_page.dart b/flutter/lib/desktop/pages/file_manager_tab_page.dart index b6f633cf5..ae8b10dd3 100644 --- a/flutter/lib/desktop/pages/file_manager_tab_page.dart +++ b/flutter/lib/desktop/pages/file_manager_tab_page.dart @@ -68,7 +68,7 @@ class _FileManagerTabPageState extends State { rustDeskWinManager.setMethodHandler((call, fromWindowId) async { debugPrint( - "[FileTransfer] call ${call.method} with args ${call.arguments} from window $fromWindowId to ${windowId()}"); + "[FileTransfer] call ${call.method} from window $fromWindowId to ${windowId()}"); // for simplify, just replace connectionId if (call.method == kWindowEventNewFileTransfer) { final args = jsonDecode(call.arguments); diff --git a/flutter/lib/desktop/pages/port_forward_tab_page.dart b/flutter/lib/desktop/pages/port_forward_tab_page.dart index a0833bf02..165374982 100644 --- a/flutter/lib/desktop/pages/port_forward_tab_page.dart +++ b/flutter/lib/desktop/pages/port_forward_tab_page.dart @@ -59,7 +59,7 @@ class _PortForwardTabPageState extends State { rustDeskWinManager.setMethodHandler((call, fromWindowId) async { debugPrint( - "[Port Forward] call ${call.method} with args ${call.arguments} from window $fromWindowId"); + "[Port Forward] call ${call.method} from window $fromWindowId"); // for simplify, just replace connectionId if (call.method == kWindowEventNewPortForward) { final args = jsonDecode(call.arguments); diff --git a/flutter/lib/desktop/pages/remote_tab_page.dart b/flutter/lib/desktop/pages/remote_tab_page.dart index acd46db55..ef0efe05f 100644 --- a/flutter/lib/desktop/pages/remote_tab_page.dart +++ b/flutter/lib/desktop/pages/remote_tab_page.dart @@ -422,8 +422,7 @@ class _ConnectionTabPageState extends State { RemoteCountState.find().value = tabController.length; Future _remoteMethodHandler(call, fromWindowId) async { - debugPrint( - "[Remote Page] call ${call.method} with args ${call.arguments} from window $fromWindowId"); + debugPrint("[Remote Page] call ${call.method} from window $fromWindowId"); dynamic returnValue; // for simplify, just replace connectionId diff --git a/flutter/lib/desktop/pages/terminal_tab_page.dart b/flutter/lib/desktop/pages/terminal_tab_page.dart index 3fa93fb9c..4b41cf0ab 100644 --- a/flutter/lib/desktop/pages/terminal_tab_page.dart +++ b/flutter/lib/desktop/pages/terminal_tab_page.dart @@ -505,8 +505,7 @@ class _TerminalTabPageState extends State { HardwareKeyboard.instance.addHandler(_handleKeyEvent); rustDeskWinManager.setMethodHandler((call, fromWindowId) async { - print( - "[Remote Terminal] call ${call.method} with args ${call.arguments} from window $fromWindowId"); + print("[Remote Terminal] call ${call.method} from window $fromWindowId"); if (call.method == kWindowEventNewTerminal) { final args = jsonDecode(call.arguments); final id = args['id']; diff --git a/flutter/lib/desktop/pages/view_camera_tab_page.dart b/flutter/lib/desktop/pages/view_camera_tab_page.dart index b72a8674f..332165b2d 100644 --- a/flutter/lib/desktop/pages/view_camera_tab_page.dart +++ b/flutter/lib/desktop/pages/view_camera_tab_page.dart @@ -387,7 +387,7 @@ class _ViewCameraTabPageState extends State { Future _remoteMethodHandler(call, fromWindowId) async { debugPrint( - "[View Camera Page] call ${call.method} with args ${call.arguments} from window $fromWindowId"); + "[View Camera Page] call ${call.method} from window $fromWindowId"); dynamic returnValue; // for simplify, just replace connectionId diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 09250a86c..54d184ab7 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -39,7 +39,7 @@ Future main(List args) async { earlyAssert(); WidgetsFlutterBinding.ensureInitialized(); - debugPrint("launch args: $args"); + debugPrint("launch with ${args.length} args"); kBootArgs = List.from(args); if (!isDesktop) { diff --git a/src/hbbs_http/account.rs b/src/hbbs_http/account.rs index 634c95383..0e6e8203c 100644 --- a/src/hbbs_http/account.rs +++ b/src/hbbs_http/account.rs @@ -278,6 +278,15 @@ impl OidcSession { return; } }; + // The UI hands this URL to the OS, which would also open file:, UNC or other handlers. + if !matches!(code_url.url.scheme(), "http" | "https") { + Self::set_state_if_current( + auth_attempt, + REQUESTING_ACCOUNT_AUTH, + "Invalid auth response".to_owned(), + ); + return; + } { let mut session = OIDC_SESSION.write().unwrap();