From c9fdacf0558b7bceac033ed5653c5f337f6fbc60 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 6 Mar 2007 11:34:38 +0000 Subject: [PATCH] fix issue with user agent and debug_extra enabled - reported by kellanved... git-svn-id: file:///svn/phpbb/trunk@7135 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 81fc33c924..80fd7e0687 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -138,7 +138,7 @@ class session $this->time_now = time(); $this->cookie_data = array('u' => 0, 'k' => ''); $this->update_session_page = $update_session_page; - $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? (string) $_SERVER['HTTP_USER_AGENT'] : ''; + $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : ''; $this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (string) $_SERVER['HTTP_X_FORWARDED_FOR'] : ''; $this->host = (!empty($_SERVER['HTTP_HOST'])) ? (string) $_SERVER['HTTP_HOST'] : 'localhost'; $this->page = $this->extract_current_page($phpbb_root_path);