Фикс parametrizedHandler-а

This commit is contained in:
Pupchansky
2024-10-09 21:12:59 +05:00
parent 1d56457148
commit 947c2b84c6
2 changed files with 14 additions and 4 deletions

View File

@@ -64,13 +64,13 @@ public sealed partial class ServerApi
{
var absolute_path = context.Url.AbsolutePath;
if (context.RequestMethod != method)
if (context.RequestMethod != method || !CheckPathes(absolute_path))
return false;
if (!await CheckAccess(context))
return true;
var formatted_maps = CheckPathes(absolute_path, exactPath);
var formatted_maps = GetMapArguments(absolute_path, exactPath);
if (formatted_maps.Count == 0)
return true;
@@ -79,7 +79,17 @@ public sealed partial class ServerApi
});
}
private static Dictionary<string, string> CheckPathes(string realPath, string predictedPath)
private static bool CheckPathes(string realPath)
{
var search_regex = ParametrSearchRegex();
if (search_regex.IsMatch(realPath))
return true;
return false;
}
private static Dictionary<string, string> GetMapArguments(string realPath, string predictedPath)
{
var search_regex = ParametrSearchRegex();

View File

@@ -48,7 +48,7 @@ def get_artifact_url() -> str:
return resp.headers["Location"]
def get_engine_version() -> str:
return "235.0.0"
return "236.0.0"
if __name__ == '__main__':