From 71096d4722c22a21284570168cc1b4444ae5c4ca Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 25 Dec 2022 11:25:00 +0100 Subject: [PATCH] (cp 796f726) fixes #1835 remove HTML tags from user_agent before storing it --- include/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.inc.php b/include/functions.inc.php index 1cb39b901..5d6006735 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -559,7 +559,7 @@ function pwg_activity($object, $object_id, $action, $details=array()) $user_agent = null; if ('user' == $object and 'login' == $action and isset($_SERVER['HTTP_USER_AGENT'])) { - $user_agent = $_SERVER['HTTP_USER_AGENT']; + $user_agent = strip_tags($_SERVER['HTTP_USER_AGENT']); } if ('photo' == $object and 'add' == $action and !isset($details['sync']))