From 4104169c197d4d6d4ca9f2a3eea17290a00286a8 Mon Sep 17 00:00:00 2001 From: Glax Date: Sun, 21 Apr 2024 21:46:52 +0200 Subject: [PATCH] Fix path excluding symbols that are used in requests --- Tranga/Server/Server.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/Server/Server.cs b/Tranga/Server/Server.cs index 8f35f86..30aeafd 100644 --- a/Tranga/Server/Server.cs +++ b/Tranga/Server/Server.cs @@ -112,7 +112,7 @@ public partial class Server : GlobalBase, IDisposable SendResponse(HttpStatusCode.OK, context.Response); //Response always contains all valid Request-Methods if (request.Url!.LocalPath.Contains("favicon")) SendResponse(HttpStatusCode.NoContent, response); - string path = Regex.Match(request.Url.LocalPath, @"\/[A-z0-9]+(\/[A-z0-9]+)*").Value; //Local Path + string path = Regex.Match(request.Url.LocalPath, @"\/[a-zA-Z0-9\.+/=-]+(\/[a-zA-Z0-9\.+/=-]+)*").Value; //Local Path if (!Regex.IsMatch(path, "/v2(/.*)?")) //Use only v2 API {