Avoid to process too large user agent

This commit is contained in:
Laurent Destailleur
2020-12-04 21:38:33 +01:00
parent 05a560c2e3
commit 0536ed87a2

View File

@@ -154,6 +154,8 @@ function getBrowserInfo($user_agent)
$os = 'unknown';
$phone = '';
$user_agent = substr($user_agent, 0, 512); // Avoid to process too large user agent
$detectmobile = new Mobile_Detect(null, $user_agent);
$tablet = $detectmobile->isTablet();