If user-agent is not known pass the agent as incoming string

This commit is contained in:
Johannes Zellner
2021-05-04 20:36:41 +02:00
parent aa86174d6b
commit 5cc5c1923a

View File

@@ -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;