From 0caeaf6e5cdf7c130f7644d8346b74f18b4af227 Mon Sep 17 00:00:00 2001 From: Novice Date: Tue, 28 Oct 2025 17:30:01 +0800 Subject: [PATCH 1/2] chore: improve mcp server url validation (#27558) --- web/app/components/tools/mcp/modal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsx index 987a517ef5..ad528e9fb9 100644 --- a/web/app/components/tools/mcp/modal.tsx +++ b/web/app/components/tools/mcp/modal.tsx @@ -141,8 +141,8 @@ const MCPModal = ({ const isValidUrl = (string: string) => { try { - const urlPattern = /^(https?:\/\/)((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3})|localhost)(:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?/i - return urlPattern.test(string) + const url = new URL(string) + return url.protocol === 'http:' || url.protocol === 'https:' } catch { return false From 3de73f07c602c2bedded97703ba5470055fa53b4 Mon Sep 17 00:00:00 2001 From: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com> Date: Tue, 28 Oct 2025 18:48:12 +0800 Subject: [PATCH 2/2] fix sl translation (#27555) Signed-off-by: tech-leader Co-authored-by: tech-leader --- web/i18n/sl-SI/tools.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/i18n/sl-SI/tools.ts b/web/i18n/sl-SI/tools.ts index dccf8b9178..cae126d99d 100644 --- a/web/i18n/sl-SI/tools.ts +++ b/web/i18n/sl-SI/tools.ts @@ -205,10 +205,10 @@ const translation = { maskedHeadersTip: 'Vrednosti glave so zakrite zaradi varnosti. Spremembe bodo posodobile dejanske vrednosti.', authentication: 'Avtentikacija', configurations: 'Konfiguracije', - clientSecret: 'Skrivnost stranke', + clientSecret: 'Skrivnost odjemalca', useDynamicClientRegistration: 'Uporabi dinamično registracijo odjemalca', - clientID: 'ID stranke', - clientSecretPlaceholder: 'Skrivnost stranke', + clientID: 'ID odjemalca', + clientSecretPlaceholder: 'Skrivnost odjemalca', }, delete: 'Odstrani strežnik MCP', deleteConfirmTitle: 'Odstraniti {mcp}?',