Compare commits

..

No commits in common. "17685e76d8d5b9e7c484a55f9d101ec54e2d1e41" and "20c1290a0e92721976e03d2ad3d75dcd8723f55e" have entirely different histories.

32 changed files with 279 additions and 284 deletions

View File

@ -48,13 +48,8 @@ public class AuthenticationController : Controller {
} else { } else {
user = ctx.Users.FirstOrDefault(e => e.Username == data.UserName); user = ctx.Users.FirstOrDefault(e => e.Username == data.UserName);
} }
if (user is null) {
return Ok(new ParentLoginInfo { Status = MembershipUserStatus.InvalidUserName });
}
PasswordVerificationResult result = new PasswordHasher<object>().VerifyHashedPassword(null, user.Password, data.Password); PasswordVerificationResult result = new PasswordHasher<object>().VerifyHashedPassword(null, user.Password, data.Password);
if (result == PasswordVerificationResult.Failed) { if (user is null || result == PasswordVerificationResult.Failed) {
return Ok(new ParentLoginInfo { Status = MembershipUserStatus.InvalidPassword }); return Ok(new ParentLoginInfo { Status = MembershipUserStatus.InvalidPassword });
} }

View File

@ -1,5 +1,5 @@
# Use the official .NET SDK image for building the application # Use the official .NET SDK image for building the application
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src WORKDIR /src
# Copy the source code # Copy the source code
@ -13,7 +13,7 @@ RUN mv src/mods /app && ln -s /app/mods src/
RUN mv src/assets /app && ln -s /app/assets src/ RUN mv src/assets /app && ln -s /app/assets src/
# Create clean run environment (without source and sdk) # Create clean run environment (without source and sdk)
# FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base # FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
# WORKDIR /app # WORKDIR /app
# COPY --from=build /app . # COPY --from=build /app .

View File

@ -3,7 +3,7 @@
namespace sodoff.Schema; namespace sodoff.Schema;
[XmlRoot(ElementName = "Mission", Namespace = "")] [XmlRoot(ElementName = "Mission", Namespace = "")]
[Serializable] [Serializable] // FIXME: Remove serializable once we have a different way of deep copying than BinaryFormatter
public class Mission { public class Mission {
public Mission() {} public Mission() {}