Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using LBPUnion.ProjectLighthouse.Database;
using LBPUnion.ProjectLighthouse.Extensions;
using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.Servers.GameServer.Helpers;
using LBPUnion.ProjectLighthouse.Logging;
using LBPUnion.ProjectLighthouse.Tickets;
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
Expand All @@ -20,7 +21,7 @@
public class LoginController : ControllerBase
{
private readonly DatabaseContext database;
public LoginController(DatabaseContext database)

Check notice on line 24 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Convert constructor into primary constructor

Convert into primary constructor
{
this.database = database;
}
Expand Down Expand Up @@ -74,7 +75,7 @@
case Platform.PS3:
case Platform.Vita:
case Platform.UnitTest:
user = await database.Users.FirstOrDefaultAsync(u => u.LinkedPsnId == npTicket.UserId);

Check notice on line 78 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
break;
case Platform.PSP:
case Platform.Unknown:
Expand All @@ -86,7 +87,7 @@
if (user == null)
{
// Check if there is an account with that username already
UserEntity? targetUsername = await database.Users.FirstOrDefaultAsync(u => u.Username == npTicket.Username);

Check notice on line 90 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
if (targetUsername != null)
{
ulong targetPlatform = npTicket.Platform == Platform.RPCS3
Expand All @@ -101,7 +102,7 @@
}

// if there is already a pending link request don't create another
bool linkAttemptExists = await database.PlatformLinkAttempts.AnyAsync(p =>

Check notice on line 105 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
p.Platform == npTicket.Platform &&
p.PlatformId == npTicket.UserId &&
p.UserId == targetUsername.UserId);
Expand All @@ -116,8 +117,8 @@
Timestamp = TimeHelper.TimestampMillis,
PlatformId = npTicket.UserId,
};
database.PlatformLinkAttempts.Add(linkAttempt);

Check notice on line 120 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
await database.SaveChangesAsync();

Check notice on line 121 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
Logger.Success($"User '{npTicket.Username}' tried to login but platform isn't linked, platform={npTicket.Platform}", LogArea.Login);
return this.Forbid();
}
Expand Down Expand Up @@ -147,11 +148,11 @@
}

// create account for user if they don't exist
user = await database.CreateUser(username, "$");

Check notice on line 151 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
user.Password = null;
user.LinkedRpcnId = npTicket.Platform == Platform.RPCS3 ? npTicket.UserId : 0;
user.LinkedPsnId = npTicket.Platform != Platform.RPCS3 ? npTicket.UserId : 0;
await database.SaveChangesAsync();

Check notice on line 155 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing

if (DiscordConfiguration.Instance.DiscordIntegrationEnabled)
{
Expand All @@ -171,7 +172,7 @@
// automatically change username if it doesn't match
else if (user.Username != npTicket.Username)
{
bool usernameExists = await database.Users.AnyAsync(u => u.Username == npTicket.Username);

Check notice on line 175 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
if (usernameExists)
{
Logger.Warn($"{npTicket.Platform} user changed their name to a name that is already taken," +
Expand All @@ -180,17 +181,17 @@
}
Logger.Info($"User's username has changed, old='{user.Username}', new='{npTicket.Username}', platform={npTicket.Platform}", LogArea.Login);
user.Username = username;
await database.PlatformLinkAttempts.RemoveWhere(p => p.UserId == user.UserId);

Check notice on line 184 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
// unlink other platforms because the names no longer match
if (npTicket.Platform == Platform.RPCS3)
user.LinkedPsnId = 0;
else
user.LinkedRpcnId = 0;

await database.SaveChangesAsync();

Check notice on line 191 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
}

GameTokenEntity? token = await database.GameTokens.Include(t => t.User)

Check notice on line 194 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
.FirstOrDefaultAsync(t => t.User.Username == npTicket.Username && t.TicketHash == npTicket.TicketHash);

if (token != null)
Expand All @@ -199,7 +200,7 @@
return this.Forbid();
}

token = await database.AuthenticateUser(user, npTicket, ipAddress);

Check notice on line 203 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing
if (token == null)
{
Logger.Warn($"Unable to find/generate a token for username {npTicket.Username}", LogArea.Login);
Expand All @@ -212,11 +213,19 @@
return this.Forbid();
}

if (ServerConfiguration.Instance.Authentication.RequirePatchworkUserAgent)
{
if (!PatchworkHelper.IsValidPatchworkUserAgent(this.Request.Headers.UserAgent.ToString()))
{
return this.Forbid();
}
}

Logger.Success($"Successfully logged in user {user.Username} as {token.GameVersion} client", LogArea.Login);

user.LastLogin = TimeHelper.TimestampMillis;

await database.SaveChangesAsync();

Check notice on line 228 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LoginController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Add/remove 'this.' qualifier

Qualifier 'this.' is missing

// Create a new room on LBP2/3/Vita
if (token.GameVersion != GameVersion.LittleBigPlanet1) RoomHelper.CreateRoom(user.UserId, token.GameVersion, token.Platform);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

private readonly DatabaseContext database;

public LogoutController(DatabaseContext database)

Check notice on line 20 in ProjectLighthouse.Servers.GameServer/Controllers/Login/LogoutController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Convert constructor into primary constructor

Convert into primary constructor
{
this.database = database;
}
Expand All @@ -38,5 +38,4 @@
return this.Ok();
}


}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;
using LBPUnion.ProjectLighthouse.Configuration;
using LBPUnion.ProjectLighthouse.Database;
using LBPUnion.ProjectLighthouse.Extensions;
Expand Down Expand Up @@ -42,7 +42,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.";

public MessageController(DatabaseContext database)

Check notice on line 45 in ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Convert constructor into primary constructor

Convert into primary constructor
{
this.database = database;
}
Expand Down Expand Up @@ -72,7 +72,7 @@
$"user.UserId: {token.UserId}\n" +
$"token.GameVersion: {token.GameVersion}\n" +
$"token.TicketHash: {token.TicketHash}\n" +
$"token.ExpiresAt: {token.ExpiresAt.ToString()}\n" +

Check warning on line 75 in ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Specify string culture explicitly

Specify string culture explicitly
"---DEBUG INFO---");
#endif

Expand Down Expand Up @@ -128,7 +128,7 @@

if (message.StartsWith("/setemail ") && ServerConfiguration.Instance.Mail.MailEnabled)
{
string email = message[(message.IndexOf(" ", StringComparison.Ordinal)+1)..];

Check notice on line 131 in ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

RoslynAnalyzers Use char overload

Use 'string.IndexOf(char)' instead of 'string.IndexOf(string)' when you have a string with a single char
if (!SanitizationHelper.IsValidEmail(email)) return this.Ok();

if (await this.database.Users.AnyAsync(u => u.EmailAddress == email)) return this.Ok();
Expand Down
24 changes: 24 additions & 0 deletions ProjectLighthouse.Servers.GameServer/Helpers/PatchworkHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using LBPUnion.ProjectLighthouse.Configuration;
using System.Text.RegularExpressions;

namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Helpers;

public static partial class PatchworkHelper
{
static readonly int requiredMajor = ServerConfiguration.Instance.Authentication.PatchworkMajorVersionMinimum;

Check notice on line 8 in ProjectLighthouse.Servers.GameServer/Helpers/PatchworkHelper.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Use explicit or implicit modifier definition for type members

Inconsistent modifiers style: missing 'private' modifier
static readonly int requiredMinor = ServerConfiguration.Instance.Authentication.PatchworkMinorVersionMinimum;

Check notice on line 9 in ProjectLighthouse.Servers.GameServer/Helpers/PatchworkHelper.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Use explicit or implicit modifier definition for type members

Inconsistent modifiers style: missing 'private' modifier

[GeneratedRegex(@"^PatchworkLBP[123V] (\d{1,5})\.(\d{1,5})$")]
private static partial Regex PatchworkUserAgentRegex();

public static bool IsValidPatchworkUserAgent(string userAgent)
{
Match result = PatchworkUserAgentRegex().Match(userAgent);
if (!result.Success) return false;

if (!int.TryParse(result.Groups[1].Value, out int major) || !int.TryParse(result.Groups[2].Value, out int minor))
return false;

return major >= requiredMajor && minor >= requiredMinor;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using LBPUnion.ProjectLighthouse.Servers.GameServer.Helpers;
using Xunit;

namespace ProjectLighthouse.Tests.GameApiTests.Unit;

[Trait("Category", "Unit")]
public class PatchworkUserAgentTests
{
[Fact]
public void CanValidatePatchworkUserAgents()
{
string[] validUserAgents = {
"PatchworkLBP1 1.0",
"PatchworkLBP2 2.0",
"PatchworkLBP3 3.0",
"PatchworkLBPV 4.0",
"PatchworkLBP1 1.5",
};

string[] invalidUserAgents = {

Check notice on line 20 in ProjectLighthouse.Tests.GameApiTests/Unit/PatchworkUserAgentTests.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Use collection expression syntax

Use collection expression
// Matching
"patchworklbp1 1.0", // Case sensitive
"ptchwrklbp1 1.0", // Misspelled
"PatchworkLBP1 1", // Missing major/minor
"PatchworkLBP1 1.000001", // Major/minor too long

// Data
"PatchworkLBP1 0.5", // Version number too low
"PatchworkLBP1 A.0" // Int cannot be parsed

Check notice on line 29 in ProjectLighthouse.Tests.GameApiTests/Unit/PatchworkUserAgentTests.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Use preferred style for trailing comma before new line in multiline lists

Add trailing comma to conform to code style
};

bool result;
for (int i = 0; i < validUserAgents.Length; i++)

Check notice on line 33 in ProjectLighthouse.Tests.GameApiTests/Unit/PatchworkUserAgentTests.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

For-loop can be converted into foreach-loop

For-loop can be converted into foreach-loop
{
result = PatchworkHelper.IsValidPatchworkUserAgent(validUserAgents[i]);
Assert.True(result, $"Valid user agent: \"{validUserAgents[i]}\" was evaluated as {result}.");
}
for (int i = 0; i < invalidUserAgents.Length; i++)

Check notice on line 38 in ProjectLighthouse.Tests.GameApiTests/Unit/PatchworkUserAgentTests.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

For-loop can be converted into foreach-loop

For-loop can be converted into foreach-loop
{
result = PatchworkHelper.IsValidPatchworkUserAgent(invalidUserAgents[i]);
Assert.False(result, $"Invalid user agent: \"{invalidUserAgents[i]}\" was evaluated as {result}.");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
public class AuthenticationConfiguration
{
public bool RegistrationEnabled { get; set; } = true;
public bool AutomaticAccountCreation { get; set; } = true;

Check notice on line 6 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public bool VerifyTickets { get; set; } = true;

Check notice on line 7 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

public bool AllowRPCNSignup { get; set; } = true;

Check notice on line 9 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

public bool AllowPSNSignup { get; set; } = true;

Check notice on line 11 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

// Require use of Zaprit's "Patchwork" prx plugin's user agent when connecting to the server
// Major and minor version minimums can be left alone if patchwork is not required
public bool RequirePatchworkUserAgent { get; set; } = false;

Check notice on line 15 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public int PatchworkMajorVersionMinimum { get; set; } = 1;

Check notice on line 16 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public int PatchworkMinorVersionMinimum { get; set; } = 0;

Check notice on line 17 in ProjectLighthouse/Configuration/ConfigurationCategories/AuthenticationConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

}
3 changes: 1 addition & 2 deletions ProjectLighthouse/Configuration/ServerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,38 @@
// This is so Lighthouse can properly identify outdated configurations and update them with newer settings accordingly.
// If you are modifying anything here, this value MUST be incremented.
// Thanks for listening~
public override int ConfigVersion { get; set; } = 27;
public override int ConfigVersion { get; set; } = 30;

public override string ConfigName { get; set; } = "lighthouse.yml";
public string WebsiteListenUrl { get; set; } = "http://localhost:10060";

Check notice on line 17 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public string GameApiListenUrl { get; set; } = "http://localhost:10061";

Check notice on line 18 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public string ApiListenUrl { get; set; } = "http://localhost:10062";

Check notice on line 19 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

public string DbConnectionString { get; set; } = "server=127.0.0.1;uid=root;pwd=lighthouse;database=lighthouse";
public string RedisConnectionString { get; set; } = "redis://localhost:6379";

Check notice on line 22 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public string ExternalUrl { get; set; } = "http://localhost:10060";

Check notice on line 23 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public string GameApiExternalUrl { get; set; } = "http://localhost:10060/LITTLEBIGPLANETPS3_XML";

Check notice on line 24 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public string EulaText { get; set; } = "";
#if !DEBUG
public string AnnounceText { get; set; } = "You are now logged in as %user.";
#else
public string AnnounceText { get; set; } = "You are now logged in as %user (id: %id).";
#endif
public bool CheckForUnsafeFiles { get; set; } = true;

Check notice on line 31 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public bool LogChatFiltering { get; set; } = false;

Check notice on line 32 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public bool LogChatMessages { get; set; } = false;

Check notice on line 33 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

public AuthenticationConfiguration Authentication { get; set; } = new();

Check notice on line 34 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public CaptchaConfiguration Captcha { get; set; } = new();

Check notice on line 35 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public DigestKeyConfiguration DigestKey { get; set; } = new();

Check notice on line 36 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public MatchmakingConfiguration Matchmaking { get; set; } = new();

Check notice on line 37 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public GoogleAnalyticsConfiguration GoogleAnalytics { get; set; } = new();

Check notice on line 38 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public MailConfiguration Mail { get; set; } = new();

Check notice on line 39 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public UserGeneratedContentLimitConfiguration UserGeneratedContentLimits { get; set; } = new();

Check notice on line 40 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public WebsiteConfiguration WebsiteConfiguration { get; set; } = new();

Check notice on line 41 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public CustomizationConfiguration Customization { get; set; } = new();

Check notice on line 42 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public RateLimitConfiguration RateLimitConfiguration { get; set; } = new();

Check notice on line 43 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public TwoFactorConfiguration TwoFactorConfiguration { get; set; } = new();

Check notice on line 44 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public RichPresenceConfiguration RichPresenceConfiguration { get; set; } = new();

Check notice on line 45 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only
public NotificationConfiguration NotificationConfiguration { get; set; } = new();

Check notice on line 46 in ProjectLighthouse/Configuration/ServerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property can be made get-only (non-private accessibility)

Auto-property can be made get-only

public override ConfigurationBase<ServerConfiguration> Deserialize(IDeserializer deserializer, string text) => deserializer.Deserialize<ServerConfiguration>(text);
Expand Down
Loading