mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-14 19:29:57 +01:00
Фикс parametrizedHandler-а
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user