Changeset 422


Ignore:
Timestamp:
Mar 28, 2023, 5:40:08 PM (20 months ago)
Author:
alloc
Message:

Added release files to version control

Location:
binary-improvements2
Files:
51 added
6 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/7dtd-binaries/README.txt

    r402 r422  
    11Put the following files from your dedicated server in this folder:
     2- 0Harmony.dll
    23- Assembly-CSharp.dll
    34- Assembly-CSharp-firstpass.dll
     
    78- System.dll
    89- System.Xml.dll
     10- System.Xml.Linq.dll
    911- UnityEngine.CoreModule.dll
    1012- UnityEngine.dll
  • binary-improvements2/CommandExtensions/CommandExtensions.csproj

    r402 r422  
    7474    <Compile Include="src\Commands\Give.cs" />
    7575    <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" />
    7976    <Compile Include="src\Commands\Reply.cs" />
    8077    <Compile Include="src\Commands\SayToPlayer.cs" />
    81     <Compile Include="src\Commands\ShowInventory.cs" />
    8278    <Compile Include="src\PrivateMessageConnections.cs" />
    8379  </ItemGroup>
    8480  <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>
    9281  <ItemGroup>
    9382    <None Include="ModInfo.xml">
  • binary-improvements2/CommandExtensions/ModInfo.xml

    r402 r422  
    55        <Description value="Additional commands for server operation" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0" />
     7        <Version value="21.0.246.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/MapRendering/ModInfo.xml

    r402 r422  
    55        <Description value="Render the game map to image map tiles as it is uncovered" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0" />
     7        <Version value="21.0.246.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/MarkersMod/ModInfo.xml

    r402 r422  
    55        <Description value="Allows placing custom markers on the web map" />
    66        <Author value="Catalysm and Alloc" />
    7         <Version value="21.0" />
     7        <Version value="21.0.246.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/WebServer/ModInfo.xml

    r402 r422  
    55        <Description value="Integrated Webserver for the Web Dashboard and server APIs" />
    66        <Author value="The Fun Pimps LLC" />
    7         <Version value="21.0" />
     7        <Version value="21.0.246.0" />
    88        <Website value="" />
    99</xml>
  • binary-improvements2/WebServer/WebServer.csproj

    r413 r422  
    101101  </ItemGroup>
    102102  <ItemGroup>
    103     <Compile Include="src\Commands\CreateWebUser.cs" />
    104103    <Compile Include="src\FileCache\AbstractCache.cs" />
    105104    <Compile Include="src\FileCache\DirectAccess.cs" />
  • binary-improvements2/WebServer/src/UrlHandlers/SessionHandler.cs

    r417 r422  
    6161                private void HandleUserPassLogin (RequestContext _context, string _remoteEndpointString) {
    6262                        if (!_context.Request.HasEntityBody) {
    63                                 _context.Response.Redirect (pageErrorPath + "NoLoginData");
     63                                WebUtils.WriteText (_context.Response, "NoLoginData", HttpStatusCode.BadRequest);
    6464                                return;
    6565                        }
     
    7676                                Log.Error ("Error deserializing JSON from user/password login:");
    7777                                Log.Exception (e);
    78                                 _context.Response.Redirect (pageErrorPath + "InvalidLoginJson");
     78                                WebUtils.WriteText (_context.Response, "InvalidLoginJson", HttpStatusCode.BadRequest);
    7979                                return;
    8080                        }
    8181
    8282                        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);
    8484                                return;
    8585                        }
    8686
    8787                        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);
    8989                                return;
    9090                        }
     
    9494                        if (!webUser.HasValue) {
    9595                                Log.Out ($"[Web] User/pass login failed from {_remoteEndpointString}");
    96                                 _context.Response.Redirect (pageErrorPath + "UserPassInvalid");
     96                                WebUtils.WriteText (_context.Response, "UserPassInvalid", HttpStatusCode.Unauthorized);
    9797                                return;
    9898                        }
     
    144144
    145145                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) {
    147147                        try {
    148148                                WebConnection con = _connectionHandler.LogIn (_context.Request.RemoteEndPoint!.Address, _username, _userId, _crossUserId);
     
    165165                                _context.Response.AppendCookie (cookie);
    166166
    167                                 if (_redirect) {
    168                                         _context.Response.Redirect (pageBasePath);
     167                                if (_sendResponse) {
     168                                        WebUtils.WriteText (_context.Response, "");
    169169                                }
    170170                        } catch (Exception e) {
    171171                                Log.Error ($"[Web] Error during {_loginName} login:");
    172172                                Log.Exception (e);
    173                                 if (_redirect) {
    174                                         _context.Response.Redirect (pageErrorPath + _errorPage);
     173                                if (_sendResponse) {
     174                                        WebUtils.WriteText (_context.Response, "LoginError", HttpStatusCode.InternalServerError);
    175175                                }
    176176                        }
  • binary-improvements2/WebServer/src/WebUtils.cs

    r404 r422  
    2424                        _resp.ContentEncoding = Encoding.UTF8;
    2525
    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                        }
    2933                }
    3034
  • binary-improvements2/server-fixes.sln

    r393 r422  
    22Microsoft Visual Studio Solution File, Format Version 11.00
    33# 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 EndProject
    64Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandExtensions", "CommandExtensions\CommandExtensions.csproj", "{E273D042-57F9-4E2E-8268-5053527E5287}"
    75EndProject
     
    2321        EndGlobalSection
    2422        GlobalSection(ProjectConfigurationPlatforms) = postSolution
    25                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Version|Any CPU.ActiveCfg = Release_Version|Any CPU
    26                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Version|Any CPU.Build.0 = Release_Version|Any CPU
    27                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
    28                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release|Any CPU.Build.0 = Release|Any CPU
    29                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Profiler|Any CPU.ActiveCfg = Release_Profiler|Any CPU
    30                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Release_Profiler|Any CPU.Build.0 = Release_Profiler|Any CPU
    31                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    32                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
    33                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug_Profiler|Any CPU.ActiveCfg = Debug_Profiler|Any CPU
    34                 {81DA7F87-1A66-4920-AADA-6EAF1971F8D0}.Debug_Profiler|Any CPU.Build.0 = Debug_Profiler|Any CPU
    3523                {A1847B5F-7BFC-4BCD-94AA-A6C9FB7E7C54}.Release_Version|Any CPU.ActiveCfg = Release|Any CPU
    3624                {A1847B5F-7BFC-4BCD-94AA-A6C9FB7E7C54}.Release_Version|Any CPU.Build.0 = Release|Any CPU
Note: See TracChangeset for help on using the changeset viewer.