diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 3 | ||||
-rw-r--r-- | include/localized_schema.php | 2 | ||||
-rw-r--r-- | include/sessions.php | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index 0d9c154d6..e2a2282d5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -60,7 +60,7 @@ "nb_NO" => "Norwegian bokmål", "nl_NL" => "Dutch", "pl_PL" => "Polski", -// "ru_RU" => "Русский", + "ru_RU" => "Русский", "pt_BR" => "Portuguese/Brazil", "zh_CN" => "Simplified Chinese", "fi_FI" => "Suomi"); @@ -621,6 +621,7 @@ $_SESSION["uid"]); $_SESSION["ip_address"] = $_SERVER["REMOTE_ADDR"]; + $_SESSION["user_agent"] = sha1($_SERVER['HTTP_USER_AGENT']); $_SESSION["pwd_hash"] = db_fetch_result($result, 0, "pwd_hash"); $_SESSION["last_version_check"] = time(); diff --git a/include/localized_schema.php b/include/localized_schema.php index 744140e4b..51d11f79a 100644 --- a/include/localized_schema.php +++ b/include/localized_schema.php @@ -1,4 +1,4 @@ -<?php # This file has been generated at: Mon Apr 1 16:28:03 MSK 2013 +<?php # This file has been generated at: Mon Apr 1 19:15:55 MSK 2013 __("Title"); __("Title or Content"); diff --git a/include/sessions.php b/include/sessions.php index 81a5a7383..dd1ca663d 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -3,6 +3,8 @@ require_once "config.php"; require_once "db.php"; + require_once "lib/accept-to-gettext.php"; + require_once "lib/gettext/gettext.inc"; $session_expire = max(SESSION_COOKIE_LIFETIME, 86400); $session_name = (!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME; @@ -57,6 +59,9 @@ if ($_SESSION["ref_schema_version"] != session_get_schema_version($link, true)) return false; + if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"]) + return false; + if ($_SESSION["uid"]) { $result = db_query($link, "SELECT pwd_hash FROM ttrss_users WHERE id = '".$_SESSION["uid"]."'"); |