diff --git a/ReplayBrowser/Helpers/ReplayHelper.cs b/ReplayBrowser/Helpers/ReplayHelper.cs index 834acde..b6f7aef 100644 --- a/ReplayBrowser/Helpers/ReplayHelper.cs +++ b/ReplayBrowser/Helpers/ReplayHelper.cs @@ -311,16 +311,18 @@ public async Task SearchReplays(SearchMode searchMode, string quer case SearchMode.PlayerOocName: var foundOocAccount = _context.Accounts .Include(a => a.Settings) - .FirstOrDefault(a => a.Username.ToLower().Contains(query.ToLower())); + .FirstOrDefault(a => a.Username.ToLower().Equals(query.ToLower())); - if (callerAccount != null && callerAccount.Username.ToLower().Contains(query.ToLower())) + if (callerAccount != null) { - break; + if (callerAccount.Username.ToLower().Equals(query, StringComparison.OrdinalIgnoreCase)) + { + break; + } } if (foundOocAccount != null && foundOocAccount.Settings.RedactInformation) { - // if the requestor is not the found account and the requestor is not an admin, deny access if (callerAccount == null || !callerAccount.IsAdmin) { throw new UnauthorizedAccessException("The account you are trying to search for is private. Contact the account owner and ask them to make their account public."); diff --git a/ReplayBrowser/Pages/Account/Manage.razor b/ReplayBrowser/Pages/Account/Manage.razor index d2950e7..98c27ed 100644 --- a/ReplayBrowser/Pages/Account/Manage.razor +++ b/ReplayBrowser/Pages/Account/Manage.razor @@ -52,11 +52,6 @@ else uri.searchParams.set("redact", redact); window.location.href = uri; }); - - // Remove current query string from URL - let uri = new URL(window.location.href); - uri.search = ""; - window.history.replaceState({}, document.title, uri); }); diff --git a/ReplayBrowser/Services/AccountService.cs b/ReplayBrowser/Services/AccountService.cs index 4903f35..be8b525 100644 --- a/ReplayBrowser/Services/AccountService.cs +++ b/ReplayBrowser/Services/AccountService.cs @@ -79,7 +79,7 @@ public void Dispose() _cache.Dispose(); } - public async Task? GetAccount(AuthenticationState authstate) + public async Task GetAccount(AuthenticationState authstate) { var guid = AccountHelper.GetAccountGuid(authstate); using var scope = _scopeFactory.CreateScope();