#147 API unban caused server to crash

Closed
opened 1 week ago by wishy · 1 comments
wishy commented 1 week ago

Build Info

  • Intersect Version : 0.6.0.185
  • Operating System: Ubuntu 18.04.3

Issue Description

Unbanning, killing or kicking a player through the API crashes the server see https://www.ascensiongamedev.com/resources/filehost/29d247fc65b581fc3de918384c6780b9.mp4 near the end of the video

2020-02-14 01:46:39.938 [Error] Received unhandled exception from Intersect Server.exe.

--------------------------------------------------------------------------------
2020-02-14 01:46:39.942 [Error] 
  Message: Cannot access a disposed object.
Object name: 'System.Net.HttpListenerResponse'.
    Stack:   at System.Net.HttpListenerResponse.set_StatusCode (System.Int32 value) [0x00013] in <4bf78e13a6ea4494a3898e6a836a77f4>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.End () [0x0001c] in <68f7adf518f945aaa528fe9acf594456>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerContext.End () [0x00010] in <68f7adf518f945aaa528fe9acf594456>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerContext.End (System.Exception ex) [0x0001e] in <68f7adf518f945aaa528fe9acf594456>:0 
  at Microsoft.Owin.Host.HttpListener.OwinHttpListener.ProcessRequestAsync (System.Net.HttpListenerContext context) [0x0019c] in <68f7adf518f945aaa528fe9acf594456>:0 
  at Microsoft.Owin.Host.HttpListener.OwinHttpListener.ProcessRequestsAsync () [0x00125] in <68f7adf518f945aaa528fe9acf594456>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 


--------------------------------------------------------------------------------
2020-02-14 01:46:41.127 [Error] Received unhandled exception from Thread Pool Worker.

--------------------------------------------------------------------------------
2020-02-14 01:46:41.128 [Error] 
  Message: Thread was being aborted.
    Stack:   at Intersect.Server.Core.ServerConsole.ThreadStart () [0x002d9] in <79ea8f233b554aa09e2e93129d91364a>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <a1ae6166591d4020b810288d19af38d4>:0 
  at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <a1ae6166591d4020b810288d19af38d4>:0 


Reproduction Steps

/api/v1/users/username/admin/unban

/api/v1/users/username/admin/kill

/api/v1/users/username/admin/kick

<!-- NOTE: If your issue is a security concern, please send an email to admin@ascensiongamedev.com instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our forum.(https://ascensiongamedev.com) 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> <!-- Check here() for info on how to determine which version you're on! --> ## Build Info - Intersect Version <!-- (Use X.X.X.XXX Format!) --> : 0.6.0.185 - Operating System: Ubuntu 18.04.3 ## Issue Description Unbanning, killing or kicking a player through the API crashes the server see https://www.ascensiongamedev.com/resources/filehost/29d247fc65b581fc3de918384c6780b9.mp4 near the end of the video ```-------------------------------------------------------------------------------- 2020-02-14 01:46:39.938 [Error] Received unhandled exception from Intersect Server.exe. -------------------------------------------------------------------------------- 2020-02-14 01:46:39.942 [Error] Message: Cannot access a disposed object. Object name: 'System.Net.HttpListenerResponse'. Stack: at System.Net.HttpListenerResponse.set_StatusCode (System.Int32 value) [0x00013] in <4bf78e13a6ea4494a3898e6a836a77f4>:0 at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.End () [0x0001c] in <68f7adf518f945aaa528fe9acf594456>:0 at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerContext.End () [0x00010] in <68f7adf518f945aaa528fe9acf594456>:0 at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerContext.End (System.Exception ex) [0x0001e] in <68f7adf518f945aaa528fe9acf594456>:0 at Microsoft.Owin.Host.HttpListener.OwinHttpListener.ProcessRequestAsync (System.Net.HttpListenerContext context) [0x0019c] in <68f7adf518f945aaa528fe9acf594456>:0 at Microsoft.Owin.Host.HttpListener.OwinHttpListener.ProcessRequestsAsync () [0x00125] in <68f7adf518f945aaa528fe9acf594456>:0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 -------------------------------------------------------------------------------- 2020-02-14 01:46:41.127 [Error] Received unhandled exception from Thread Pool Worker. -------------------------------------------------------------------------------- 2020-02-14 01:46:41.128 [Error] Message: Thread was being aborted. Stack: at Intersect.Server.Core.ServerConsole.ThreadStart () [0x002d9] in <79ea8f233b554aa09e2e93129d91364a>:0 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <a1ae6166591d4020b810288d19af38d4>:0 ``` -------------------------------------------------------------------------------- ## Reproduction Steps /api/v1/users/username/admin/unban /api/v1/users/username/admin/kill /api/v1/users/username/admin/kick <!-- **If this issue involves anything visual please include a screenshot or video!** --> <!-- **Attach log files found in your Server/Logs, Client/Logs, and Editor/Logs folders!** -->
jcsnider commented 1 week ago
Owner

Fixed the /api/v1/users/userId/admin/* endpoints.

The http error above was solved by sending an empty string as the body (“”) with the post request instead of a null body.

The server on linux crashed with a null body, and did nothing on windows with a null body, but they both worked with an empty body for those endpoints.

It sorta makes sense that a post request with no body would fail, and that linux would kinda implode while windows would just ignore it and keep going lol

Fixed the /api/v1/users/userId/admin/* endpoints. The http error above was solved by sending an empty string as the body ("") with the post request instead of a null body. The server on linux crashed with a null body, and did nothing on windows with a null body, but they both worked with an empty body for those endpoints. It sorta makes sense that a post request with no body would fail, and that linux would kinda implode while windows would just ignore it and keep going lol
Sign in to join this conversation.
Loading…
Cancel
Save
There is no content yet.