Skip to content

Commit ffc0828

Browse files
fix: exception when calling database
There appears to be a bug in the current version of the MySQL entity framework implementation where using the string's ".Equals" results in a "LCASE" command that throws a null reference exception. Since MySQL is not case sensitive we can simple remove this part of the database calls for now...
1 parent 9b9a096 commit ffc0828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Nullinside.Api.Common.AspNetCore/Middleware/BasicAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync() {
6060
.Include(i => i.Roles)
6161
.AsNoTracking()
6262
.FirstOrDefaultAsync(u => !string.IsNullOrWhiteSpace(u.Token) &&
63-
u.Token.Equals(token, StringComparison.InvariantCultureIgnoreCase) &&
63+
u.Token == token &&
6464
!u.IsBanned);
6565

6666
if (null == dbUser) {

0 commit comments

Comments
 (0)