Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
False
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ed9f5ea2a66b781f44c6b7ab8e9fb92affb5463d671bdeeb62f10925c1330d4c
1 change: 1 addition & 0 deletions .dotnet_home/.dotnet/MachineId.v1.dotnetUserLevelCache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ed9f5ea2a66b781f44c6b7ab8e9fb92affb5463d671bdeeb62f10925c1330d4c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://dc.services.visualstudio.com/v2/track
Content-Type:application/x-json-stream
Content-Encoding:gzip

H4sIAAAAAAAACqxUy24cNxD8lUGfhyO+53EzpAQRFMOCZThBbk2y6SU84ixmuLINYf894KwMRbkFyI1oorqrqot8hoyPBBO8Ox5/eaJcNmihpL0kubSMSybVJy4mwycjO9UbLST/C1pId/QDJui198KPxBRZYjpww5yKnoVAo+AicGl07YlfNpieAVMX6Cl56pbtM61bWjJM8EfKYflWZ2Pq/LycQrcuM93mrWD2lczD73eX2422CupSgAkGK5wZSDA7SME0R89QoGZ8RK9iL4WR8QJLudCace628PV1blhKpuIn2UnVcSZHOLcQsGCl6nCjTz+OdfpuzU2tt3t5P07P8EQrTLL9aeKl3ZWf05VfHh8xh6uYctoO0MJxXY60lkS7DbuyecaSlty8DLmeE+UCLXx4aO5nLHFZH99483CRfvsflL9Hf0iZmtsbmIDCGA2hRGtdP4iotbeuRzfQGN0oMUZntFXB9sIFImdlFHyUxguleNAeWrheckn5tJy25jYX+rLuCmCCX3He6ML93eoPqZAvp7XK+tPW/dP3VK6XUAsCWrhfl3DypXldheAd7wRXtcepHE+l+UghreQLhbf9/4WRVnBeqZ3WlXJp7rEcmt9wO8AEVtgxiuipj47ioEfnpFbSkxpklEZZLpCj4YjS6LGXCocYlSHtMBokV4nX1Td72ryxvQwiMMEHZNqawAYrDYvDWPFBe1elvnrefJgr7n/w/adfL1HRA7QQ6OnylHZyWtteaiOYQiOYVp7YWAMxGMuFdQrRVf/uaM00/8PD98mvy7bE0rwErXnj6sdTrt9Bs4fuW8rs+77Om8V/pbWpccCU6yt42dD5fD7/DQAA//8DABsIlFFVBAAA
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://dc.services.visualstudio.com/v2/track
Content-Type:application/x-json-stream
Content-Encoding:gzip

H4sIAAAAAAAACqxUXWvdOBD9K0bPlqNvW34rSUpDtjQ0Ybf0bSSNEhFHvthy2hLuf1/km9LNvhX6IsyYM2fOmSO9kAxPSEby7nC4fMZcVtKSkvaSYMJQJqiQd4yPmo1adLLnXCv5lbQkXeMPMpJeec+9RSrRIFWBaepk9DQEtJzxwIRWtSfcr2R8IZC6gM/JYzevf+OypjmTkfyTcpi/VW5InZ/mLXTLPOFVXgtkX4e5/ev69HfFtYK6FMhIBsOdHpBTMwhOFQNPgYOizIKXsRdci3iCpVxwyTB1a3j8xRvmkrH4UXRCdowKS44tCVCgjupgxbsfh8q+W3NR6+1e3j/HF/KMCxlF+9PEU7szP6Wzp9VtaQpnp7PA+ljVHZb5gEtJuHuxy5smKGnOzSvT+ZQwF9KST7fNzQQlzsvTG4NuT/qvfkP+XWW//I5+KxjO5y0XMhLZk5Z8BP+QMjZXF2QkGGzUCAKMcf3Ao1LeuB7cgDY6KyBGp5WRwfTcBURnROTMCu25lCwoT1pyPueS8jZva3OVC94vuzYykvcwrXhS9W7xD6mgL9tSBX8xNR43yxw2X5pfq+GsYx1nsoK2cthK8xlDWtAXDG8b/g8jDGeszrItC+bS3EB5aD7A+kBGYrixkUePfXQYB2WdE0oKj3IQUWhpGAcGmgEIrWwvJAwxSo3KQdSAjrQEaxSaU/qsNNy6QAXTQBX0kloLhtpgmQ3Kcx/emtx8miruDxj906/X1KiBtCTg8+lq7cMpZXqhNKcSNKdKeqS2ZmPQhnHjJICr/l3jknH6j4cfk1/mdY6lec1c88bVz1uuz0Oz5+9byvT7vr+L2T/i0tT9Q8r1Vrxu6Hg8Hv8FAAD//wMAaDA4y2UEAAA=
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://dc.services.visualstudio.com/v2/track
Content-Type:application/x-json-stream
Content-Encoding:gzip

H4sIAAAAAAAACqyUXW/dKBCG/4o118YBDPjjLkpabZStGjXRbrV3fAwNioOPAKeNovPfV/ikymZvqpX2BqHBM/PyzItfIOpHhBnOD4cPTxhLhhZK2EOcckUoJ7y/o2yWdJa869Uox5H+BS2Ea3yGGQZhLbMTkh4VEuGoJKb3ljiHE6PMUS5Fram/ZZhfQIfO4VOw2K35D0w5rBFm+DNEt36vvXXo7LJurkvrglcxFx1tFXP7+/XpNGOuSV1wMMOomJEjMqJGzoig2hLNtCB00rb3A2eS+1NaiAVT1EuX3cNbX7eWiMXOvON9Rwmf4NiC00VXqUZnvHs+1O47mssab/fwvp1f4AkTzLz9CfFU7swu4ewxmy0s7uy0Fp0f8r56bcuanqGFQ1oPmErAnct5zvholuc7nR8+nr6p2/zhB9qtoLtYt1hgBqaghZ3LsugS1ti8SrxYAsayH5YUYg72V6U4gxY+3zY3iy5+TY/v5nB7wnz1Hyh/0vY+RGyuLmEGdJOXqLlWygwj80JYZQZtRpy8mbj23kiheqcGZhyiUdwzOnFpWd9TJyy0cLHGEuK2brm5igW/pf2+MMNHvWQ8aT9P9j4UtGVLFcJXVb12k1a32dK8zZnRjnaM9jVpK4etNF/QhYS2oHtf8F85XDFKq5YtJYyludHlvvlN53uYQTE1eeYtDt6gH8VkDBc9t9iP3HPZK8o01ZJqzaWYBt7r0fteojDaS40GWsDqq2a3shtwdBNHMimriBi5I6MZDVHUS4NuHCZXM94gN5+Xmvc/gP7J69VJYoQWHD6d3ukuTgg1cCEZ6bVkRPQWyVQdMEpFmTK91qbyu8YUcfkHw0/BpjWvvjSvzmreUf2yxfqvaXaXfQ+R/Njnd7naB0xNnb8OsT6x1wkdj8fj3wAAAP//AwAC6zB2sgQAAA==
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://dc.services.visualstudio.com/v2/track
Content-Type:application/x-json-stream
Content-Encoding:gzip

H4sIAAAAAAAACqxUXU/lNhD9K5FfmwR/5+ONAqtFlAXtRduqb2N7DC65zlXiQBG6/71yLuwCqz5U6ksU2Z6ZM+ecmWcSYYukJ8e73dkDxjSTkqSwHnHKdUV5xcUNZb2iveK1aKRqJPuTlCRc4BPpSSOtZbbDSqDGSjqqKiO8rZzDjlHmKFcy54TbmfTPBELt8CFYrMf5G05zGCPpye8huvEx14ZQ22FcXD2NA57HOUG0Gczmt4vD7YxzDqqDIz1pNTOqRVbplrNKUrAVMJAV7cAK33CmuD+EhZhwijDUs7v/UdeNKWKyPa+5qGnFO7IviYMEGaqBGW+edrn6Ss1pPi/X4/W3fyYPOJGel68kHtId2SEcbWezhMEdrV9Skt007nBKAVcW1saGAVIYY/FS42QIGBMpya85ZLNYi/NMevIJhhlfj8/ibYj4aYItPo7T/ZdD3frL2Q0pyfU0/oU2XUO6Iz0x2FHsOAjBPLTApXAOrOpc56xrgaq2oQqlEQK6BhqqQTJoWs58x5k3hpTkalNcD5D8OG3fibQ5aHD+HyTYHJ+cRTADuo8t3cB0i4n0RILSujW66xBZo1xrUWtk3lkmLYJwoLBVgjZOG8UNpQKtkNBxJhiizi67BHsXIhbnp6Qn6DqvEDhobZqWeSmtNg2YFjtvOg7eGyW1cLphxiEazT2jHVeWCUGdtKQkJ2NMIS7jMhfnMeHttCr2poOrTXE82buQ0KZlylr8sQK5nka32FT8sBqjNa0ZFTloSbslFV/RhQltekfJ1eZjDNeM0oxlmSaMqcjyFp9hzhprpjvPvMXGG/St7IzhUnCLouWeK6EpAwqKAnAlu4YLaL0XWXXwCjBrjNnaxTpNCjqlBW8qKrGppKGmyjapmgakkWg8pe4dycXV4P4fot+Y+037baaM1Y1eaXvl9GVeZEtK4vDhsE7WBqTUDZeKVQIUq6SwWHXZi63SlGkjAMyHSfo8ztl63zYno8tXFzhFHN5IcBnsNM6jT8WL/Yt3orxJdRrm3QBPP8H/xXIplBX4/f3JHdr7n6fh6xLz5i3WsXoMsfp7tdLpaO9xKrIVIcS8cL5HXC5DCjd3E4JDdzk6/Jh0X5ItwrxMuF13+7p6Ik4rjNPlYOfzeBmGIcxox+hm0jMuGaulFPIF778/VLKruZR6v9/v/wEAAP//AwC4m3+MSwYAAA==
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Microsoft.NET.Workload.Emscripten.Current": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Emscripten.net6": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Emscripten.net7": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Emscripten.net8": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Emscripten.net9": "10.0.103/10.0.100",
"Microsoft.NET.Sdk.Android": "36.1.30/10.0.100",
"Microsoft.NET.Sdk.iOS": "26.2.10197/10.0.100",
"Microsoft.NET.Sdk.MacCatalyst": "26.2.10197/10.0.100",
"Microsoft.NET.Sdk.macOS": "26.2.10197/10.0.100",
"Microsoft.NET.Sdk.Maui": "10.0.20/10.0.100",
"Microsoft.NET.Sdk.tvOS": "26.2.10197/10.0.100",
"Microsoft.NET.Workload.Mono.ToolChain.Current": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Mono.ToolChain.net6": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Mono.ToolChain.net7": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Mono.ToolChain.net8": "10.0.103/10.0.100",
"Microsoft.NET.Workload.Mono.ToolChain.net9": "10.0.103/10.0.100"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.0.100
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.0.103
2 changes: 1 addition & 1 deletion OpenBullet2.Core/OpenBullet2.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BCrypt.Net-Core" Version="1.6.0"/>
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3"/>
<PackageReference Include="MaxMind.GeoIP2" Version="5.2.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
Expand Down
2 changes: 2 additions & 0 deletions OpenBullet2.Web/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global using Asp.Versioning;
global using Asp.Versioning.ApiExplorer;
6 changes: 3 additions & 3 deletions OpenBullet2.Web/OpenBullet2.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
<PackageReference Include="Asp.Versioning.Mvc" Version="8.1.0" />
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6"/>
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.11" />
<PackageReference Include="nulastudio.NetBeauty" Version="2.1.4.5"/>
Expand All @@ -59,7 +59,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2"/>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 6 additions & 10 deletions OpenBullet2.Web/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Asp.Versioning;
using Asp.Versioning.ApiExplorer;
using Microsoft.EntityFrameworkCore;
using OpenBullet2.Core;
using OpenBullet2.Core.Helpers;
Expand Down Expand Up @@ -53,6 +53,10 @@
options.AssumeDefaultVersionWhenUnspecified = true;
options.DefaultApiVersion = new ApiVersion(1, 0);
options.ReportApiVersions = true;
}).AddApiExplorer(setup =>
{
setup.GroupNameFormat = "'v'VVV";
setup.SubstituteApiVersionInUrl = true;
});

builder.Services.AddControllers()
Expand All @@ -71,14 +75,6 @@
var enumConverter = new JsonStringEnumConverter(JsonNamingPolicy.CamelCase);
options.PayloadSerializerOptions.Converters.Add(enumConverter);
});

// Swagger with versioning implemented according to this guide
// https://referbruv.com/blog/integrating-aspnet-core-api-versions-with-swagger-ui/
builder.Services.AddVersionedApiExplorer(setup =>
{
setup.GroupNameFormat = "'v'VVV";
setup.SubstituteApiVersionInUrl = true;
});
builder.Services.AddSwaggerGen(c =>
{
c.AddSecurityDefinition("Api Key", new OpenApiSecurityScheme
Expand Down
4 changes: 2 additions & 2 deletions OpenBullet2.Web/Utils/AutoMapperProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public AutoMapperProfile()

CreateMap<CreateGuestDto, GuestEntity>()
.ForMember(entity => entity.PasswordHash, e => e.MapFrom(dto =>
BCrypt.Net.BCrypt.HashPassword(dto.Password, SaltRevision.Revision2B)))
BCrypt.Net.BCrypt.HashPassword(dto.Password)))
.ForMember(entity => entity.AllowedAddresses, e => e.MapFrom(dto =>
string.Join(',', dto.AllowedAddresses)));

Expand All @@ -95,7 +95,7 @@ public AutoMapperProfile()

CreateMap<UpdateGuestPasswordDto, GuestEntity>()
.ForMember(entity => entity.PasswordHash, e => e.MapFrom(dto =>
BCrypt.Net.BCrypt.HashPassword(dto.Password, SaltRevision.Revision2B)));
BCrypt.Net.BCrypt.HashPassword(dto.Password)));

CreateMap<GuestEntity, GuestDto>()
.ForMember(dto => dto.AllowedAddresses, e => e.MapFrom(entity =>
Expand Down
2 changes: 1 addition & 1 deletion OpenBullet2.Web/Utils/ConfigureSwaggerOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Asp.Versioning.ApiExplorer;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
Expand Down
7 changes: 3 additions & 4 deletions RuriLib/Blocks/Functions/Crypto/Methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,12 @@ public static string BCryptHash(BotData data, string input, string salt)
return hashed;
}

[Block("Generates a BCrypt hash from an input by generating a salt", name = "BCrypt Hash (Gen Salt)",
extraInfo = "bcryptjs uses salt revision 2X by default currently")]
public static string BCryptHashGenSalt(BotData data, string input, int rounds = 10, SaltRevision saltRevision = SaltRevision.Revision2X)
[Block("Generates a BCrypt hash from an input by generating a salt", name = "BCrypt Hash (Gen Salt)")]
public static string BCryptHashGenSalt(BotData data, string input, int rounds = 10)
{
data.Logger.LogHeader();

var hashed = RuriLib.Functions.Crypto.Crypto.BCryptGenSalt(input, rounds, saltRevision);
var hashed = RuriLib.Functions.Crypto.Crypto.BCryptGenSalt(input, rounds);
data.Logger.Log($"Hashed: {hashed}", LogColors.YellowGreen);

return hashed;
Expand Down
6 changes: 3 additions & 3 deletions RuriLib/Functions/Crypto/Crypto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ public static string BCryptWithSalt(string input, string salt = "")

/// <summary>
/// Hashes an <paramref name="input"/> with BCrypt after generating the salt with the given number of
/// <paramref name="rounds"/> and <paramref name="saltRevision"/>.
/// <paramref name="rounds"/>.
/// </summary>
public static string BCryptGenSalt(string input, int rounds = 10, SaltRevision saltRevision = SaltRevision.Revision2X)
=> BCrypt.Net.BCrypt.HashPassword(input, rounds, saltRevision);
public static string BCryptGenSalt(string input, int rounds = 10)
=> BCrypt.Net.BCrypt.HashPassword(input, rounds);

/// <summary>
/// Verifies that a BCrypt <paramref name="hash"/> is valid with respect to a given <paramref name="input"/>.
Expand Down
2 changes: 1 addition & 1 deletion RuriLib/RuriLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="AngleSharp" Version="1.1.2" />
<PackageReference Include="BCrypt.Net-Core" Version="1.6.0" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="CaptchaSharp" Version="2.1.0" />
<PackageReference Include="DeviceId" Version="5.2.0" />
<PackageReference Include="FluentFTP" Version="50.0.1" />
Expand Down
Binary file added build_log.txt
Binary file not shown.
Binary file added build_log_pr3.txt
Binary file not shown.
Binary file added build_log_pr3_v2.txt
Binary file not shown.
Binary file added restore_log.txt
Binary file not shown.