If user-agent is not known pass the agent as incoming string
This commit is contained in:
@@ -547,7 +547,7 @@ function checkLoginLocation(user, ip, userAgent) {
|
||||
if (!city || !country) return;
|
||||
|
||||
const ua = uaParser(userAgent);
|
||||
const simplifiedUserAgent = ua.browser.name ? `${ua.browser.name} - ${ua.os.name}` : '';
|
||||
const simplifiedUserAgent = ua.browser.name ? `${ua.browser.name} - ${ua.os.name}` : userAgent;
|
||||
|
||||
const knownLogin = user.loginLocations.find(function (l) {
|
||||
return l.userAgent === simplifiedUserAgent && l.country === country && l.city === city;
|
||||
|
||||
Reference in New Issue
Block a user