diff --git a/Content.Server/Administration/ServerApi.Utility.cs b/Content.Server/Administration/ServerApi.Utility.cs index d2031599db..538e2ce327 100644 --- a/Content.Server/Administration/ServerApi.Utility.cs +++ b/Content.Server/Administration/ServerApi.Utility.cs @@ -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 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 GetMapArguments(string realPath, string predictedPath) { var search_regex = ParametrSearchRegex(); diff --git a/Tools/publish_github_artifact.py b/Tools/publish_github_artifact.py index e234b03021..3a020bbd90 100755 --- a/Tools/publish_github_artifact.py +++ b/Tools/publish_github_artifact.py @@ -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__':