Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
WebServer hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ic3w0lf22 committed Jun 4, 2022
1 parent d206262 commit 9b17bce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions RBX Alt Manager/AccountManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ private string SendResponse(HttpListenerRequest request)

if (Method == "GetAccounts")
{
if (WebServer.Get<bool>("AllowGetAccounts")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowGetAccounts")) return "Method not allowed";

string Names = "";

Expand All @@ -641,14 +641,14 @@ private string SendResponse(HttpListenerRequest request)

if (Method == "GetCookie")
{
if (WebServer.Get<bool>("AllowGetCookie")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowGetCookie")) return "Method not allowed";

return account.SecurityToken;
}

if (Method == "LaunchAccount")
{
if (WebServer.Get<bool>("AllowLaunchAccount")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowLaunchAccount")) return "Method not allowed";

bool ValidPlaceId = long.TryParse(request.QueryString["PlaceId"], out long PlaceId); if (!ValidPlaceId) return "Invalid PlaceId";

Expand Down Expand Up @@ -700,15 +700,15 @@ private string SendResponse(HttpListenerRequest request)
if (Method == "GetField" && !string.IsNullOrEmpty(request.QueryString["Field"])) return account.GetField(request.QueryString["Field"]);
if (Method == "SetField" && !string.IsNullOrEmpty(request.QueryString["Field"]) && !string.IsNullOrEmpty(request.QueryString["Value"]))
{
if (WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";

account.SetField(request.QueryString["Field"], request.QueryString["Value"]);

return $"Set Field {request.QueryString["Field"]} to {request.QueryString["Value"]}";
}
if (Method == "RemoveField" && !string.IsNullOrEmpty(request.QueryString["Field"]))
{
if (WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";

account.RemoveField(request.QueryString["Field"]);

Expand All @@ -719,7 +719,7 @@ private string SendResponse(HttpListenerRequest request)

if (Method == "SetAlias" && !string.IsNullOrEmpty(Body))
{
if (WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";

account.Alias = Body;
UpdateAccountView(account);
Expand All @@ -728,7 +728,7 @@ private string SendResponse(HttpListenerRequest request)
}
if (Method == "SetDescription" && !string.IsNullOrEmpty(Body))
{
if (WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";

account.Description = Body;
UpdateAccountView(account);
Expand All @@ -737,7 +737,7 @@ private string SendResponse(HttpListenerRequest request)
}
if (Method == "AppendDescription" && !string.IsNullOrEmpty(Body))
{
if (WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";
if (!WebServer.Get<bool>("AllowAccountEditing")) return "Method not allowed";

account.Description += Body;
UpdateAccountView(account);
Expand Down
2 changes: 1 addition & 1 deletion RBX Alt Manager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.1.0")]

0 comments on commit 9b17bce

Please sign in to comment.