Ignore:
Timestamp:
May 7, 2023, 5:05:29 PM (19 months ago)
Author:
alloc
Message:

Fixed: User registration allowed same username for multiple users

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/WebServer/src/UrlHandlers/SessionHandler.cs

    r422 r433  
    9090                        }
    9191
    92                         AdminWebUsers.WebUser? webUser = AdminWebUsers.Instance.GetUser (username, password);
    93 
    94                         if (!webUser.HasValue) {
     92                        if (!AdminWebUsers.Instance.TryGetUser (username, password, out AdminWebUsers.WebUser webUser)) {
    9593                                Log.Out ($"[Web] User/pass login failed from {_remoteEndpointString}");
    9694                                WebUtils.WriteText (_context.Response, "UserPassInvalid", HttpStatusCode.Unauthorized);
     
    9896                        }
    9997
    100                         HandleUserIdLogin (connectionHandler, _context, _remoteEndpointString, userPassLoginName, userPassErrorPage, webUser.Value.Name, webUser.Value.PlatformUser, webUser.Value.CrossPlatformUser);
     98                        HandleUserIdLogin (connectionHandler, _context, _remoteEndpointString, userPassLoginName, userPassErrorPage, webUser.Name, webUser.PlatformUser, webUser.CrossPlatformUser);
    10199                }
    102100
Note: See TracChangeset for help on using the changeset viewer.