Changeset 422
- Timestamp:
- Mar 28, 2023, 5:40:08 PM (21 months ago)
- Location:
- binary-improvements2
- Files:
-
- 51 added
- 6 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/7dtd-binaries/README.txt
r402 r422 1 1 Put the following files from your dedicated server in this folder: 2 - 0Harmony.dll 2 3 - Assembly-CSharp.dll 3 4 - Assembly-CSharp-firstpass.dll … … 7 8 - System.dll 8 9 - System.Xml.dll 10 - System.Xml.Linq.dll 9 11 - UnityEngine.CoreModule.dll 10 12 - UnityEngine.dll -
binary-improvements2/CommandExtensions/CommandExtensions.csproj
r402 r422 74 74 <Compile Include="src\Commands\Give.cs" /> 75 75 <Compile Include="src\Commands\ListItems.cs" /> 76 <Compile Include="src\Commands\ListKnownPlayers.cs" />77 <Compile Include="src\Commands\ListLandProtection.cs" />78 <Compile Include="src\Commands\RemoveLandProtection.cs" />79 76 <Compile Include="src\Commands\Reply.cs" /> 80 77 <Compile Include="src\Commands\SayToPlayer.cs" /> 81 <Compile Include="src\Commands\ShowInventory.cs" />82 78 <Compile Include="src\PrivateMessageConnections.cs" /> 83 79 </ItemGroup> 84 80 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 85 <ItemGroup>86 <ProjectReference Include="..\7dtd-server-fixes\7dtd-server-fixes.csproj">87 <Project>{81DA7F87-1A66-4920-AADA-6EAF1971F8D0}</Project>88 <Name>7dtd-server-fixes</Name>89 <Private>False</Private>90 </ProjectReference>91 </ItemGroup>92 81 <ItemGroup> 93 82 <None Include="ModInfo.xml"> -
binary-improvements2/CommandExtensions/ModInfo.xml
r402 r422 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0 " />7 <Version value="21.0.246.0" /> 8 8 <Website value="" /> 9 9 </xml> -
binary-improvements2/MapRendering/ModInfo.xml
r402 r422 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0 " />7 <Version value="21.0.246.0" /> 8 8 <Website value="" /> 9 9 </xml> -
binary-improvements2/MarkersMod/ModInfo.xml
r402 r422 5 5 <Description value="Allows placing custom markers on the web map" /> 6 6 <Author value="Catalysm and Alloc" /> 7 <Version value="21.0 " />7 <Version value="21.0.246.0" /> 8 8 <Website value="" /> 9 9 </xml> -
binary-improvements2/WebServer/ModInfo.xml
r402 r422 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0 " />7 <Version value="21.0.246.0" /> 8 8 <Website value="" /> 9 9 </xml> -
binary-improvements2/WebServer/WebServer.csproj
r413 r422 101 101 </ItemGroup> 102 102 <ItemGroup> 103 <Compile Include="src\Commands\CreateWebUser.cs" />104 103 <Compile Include="src\FileCache\AbstractCache.cs" /> 105 104 <Compile Include="src\FileCache\DirectAccess.cs" /> -
binary-improvements2/WebServer/src/UrlHandlers/SessionHandler.cs
r417 r422 61 61 private void HandleUserPassLogin (RequestContext _context, string _remoteEndpointString) { 62 62 if (!_context.Request.HasEntityBody) { 63 _context.Response.Redirect (pageErrorPath + "NoLoginData");63 WebUtils.WriteText (_context.Response, "NoLoginData", HttpStatusCode.BadRequest); 64 64 return; 65 65 } … … 76 76 Log.Error ("Error deserializing JSON from user/password login:"); 77 77 Log.Exception (e); 78 _context.Response.Redirect (pageErrorPath + "InvalidLoginJson");78 WebUtils.WriteText (_context.Response, "InvalidLoginJson", HttpStatusCode.BadRequest); 79 79 return; 80 80 } 81 81 82 82 if (!inputJson.TryGetValue ("username", out object fieldNode) || fieldNode is not string username) { 83 _context.Response.Redirect (pageErrorPath + "InvalidLoginJson");83 WebUtils.WriteText (_context.Response, "InvalidLoginJson", HttpStatusCode.BadRequest); 84 84 return; 85 85 } 86 86 87 87 if (!inputJson.TryGetValue ("password", out fieldNode) || fieldNode is not string password) { 88 _context.Response.Redirect (pageErrorPath + "InvalidLoginJson");88 WebUtils.WriteText (_context.Response, "InvalidLoginJson", HttpStatusCode.BadRequest); 89 89 return; 90 90 } … … 94 94 if (!webUser.HasValue) { 95 95 Log.Out ($"[Web] User/pass login failed from {_remoteEndpointString}"); 96 _context.Response.Redirect (pageErrorPath + "UserPassInvalid");96 WebUtils.WriteText (_context.Response, "UserPassInvalid", HttpStatusCode.Unauthorized); 97 97 return; 98 98 } … … 144 144 145 145 public static void HandleUserIdLogin (ConnectionHandler _connectionHandler, RequestContext _context, string _remoteEndpointString, 146 string _loginName, string _errorPage, string _username, PlatformUserIdentifierAbs _userId, PlatformUserIdentifierAbs _crossUserId = null, bool _ redirect= true) {146 string _loginName, string _errorPage, string _username, PlatformUserIdentifierAbs _userId, PlatformUserIdentifierAbs _crossUserId = null, bool _sendResponse = true) { 147 147 try { 148 148 WebConnection con = _connectionHandler.LogIn (_context.Request.RemoteEndPoint!.Address, _username, _userId, _crossUserId); … … 165 165 _context.Response.AppendCookie (cookie); 166 166 167 if (_ redirect) {168 _context.Response.Redirect (pageBasePath);167 if (_sendResponse) { 168 WebUtils.WriteText (_context.Response, ""); 169 169 } 170 170 } catch (Exception e) { 171 171 Log.Error ($"[Web] Error during {_loginName} login:"); 172 172 Log.Exception (e); 173 if (_ redirect) {174 _context.Response.Redirect (pageErrorPath + _errorPage);173 if (_sendResponse) { 174 WebUtils.WriteText (_context.Response, "LoginError", HttpStatusCode.InternalServerError); 175 175 } 176 176 } -
binary-improvements2/WebServer/src/WebUtils.cs
r404 r422 24 24 _resp.ContentEncoding = Encoding.UTF8; 25 25 26 byte[] buf = Encoding.UTF8.GetBytes (_text); 27 _resp.ContentLength64 = buf.Length; 28 _resp.OutputStream.Write (buf, 0, buf.Length); 26 if (string.IsNullOrEmpty (_text)) { 27 _resp.ContentLength64 = 0; 28 } else { 29 byte[] buf = Encoding.UTF8.GetBytes (_text); 30 _resp.ContentLength64 = buf.Length; 31 _resp.OutputStream.Write (buf, 0, buf.Length); 32 } 29 33 } 30 34 -
binary-improvements2/server-fixes.sln
r393 r422 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 3 # Visual Studio 2010 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7dtd-server-fixes", "7dtd-server-fixes\7dtd-server-fixes.csproj", "{81DA7F87-1A66-4920-AADA-6EAF1971F8D0}"5 EndProject6 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandExtensions", "CommandExtensions\CommandExtensions.csproj", "{E273D042-57F9-4E2E-8268-5053527E5287}" 7 5 EndProject … … 23 21 EndGlobalSection 24 22 GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Version|Any CPU.ActiveCfg = Release_Version|Any CPU26 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Version|Any CPU.Build.0 = Release_Version|Any CPU27 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release|Any CPU.ActiveCfg = Release|Any CPU28 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release|Any CPU.Build.0 = Release|Any CPU29 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Profiler|Any CPU.ActiveCfg = Release_Profiler|Any CPU30 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Profiler|Any CPU.Build.0 = Release_Profiler|Any CPU31 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU32 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug|Any CPU.Build.0 = Debug|Any CPU33 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug_Profiler|Any CPU.ActiveCfg = Debug_Profiler|Any CPU34 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug_Profiler|Any CPU.Build.0 = Debug_Profiler|Any CPU35 23 {A1847B5F-7BFC-4BCD-94AA-A6C9FB7E7C54}.Release_Version|Any CPU.ActiveCfg = Release|Any CPU 36 24 {A1847B5F-7BFC-4BCD-94AA-A6C9FB7E7C54}.Release_Version|Any CPU.Build.0 = Release|Any CPU
Note:
See TracChangeset
for help on using the changeset viewer.