mobile version uses separate sid
This commit is contained in:
parent
757e8a2dae
commit
3dd46f19db
|
@ -940,7 +940,7 @@
|
||||||
|
|
||||||
function basic_nosid_redirect_check() {
|
function basic_nosid_redirect_check() {
|
||||||
if (!SINGLE_USER_MODE) {
|
if (!SINGLE_USER_MODE) {
|
||||||
if (!$_COOKIE["ttrss_sid"]) {
|
if (!$_COOKIE[get_session_cookie_name()]) {
|
||||||
$redirect_uri = get_login_redirect();
|
$redirect_uri = get_login_redirect();
|
||||||
$return_to = preg_replace('/.*?\//', '', $_SERVER["REQUEST_URI"]);
|
$return_to = preg_replace('/.*?\//', '', $_SERVER["REQUEST_URI"]);
|
||||||
header("Location: $redirect_uri?rt=$return_to");
|
header("Location: $redirect_uri?rt=$return_to");
|
||||||
|
@ -1684,4 +1684,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_session_cookie_name() {
|
||||||
|
return ((!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
$password = $_POST["password"];
|
$password = $_POST["password"];
|
||||||
$return_to = $_POST["rt"];
|
$return_to = $_POST["rt"];
|
||||||
|
|
||||||
if ($_COOKIE["ttrss_sid"]) {
|
if ($_COOKIE[get_session_cookie_name()]) {
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
if ($_SESSION["uid"]) {
|
if ($_SESSION["uid"]) {
|
||||||
initialize_user_prefs($link, $_SESSION["uid"]);
|
initialize_user_prefs($link, $_SESSION["uid"]);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?
|
<?
|
||||||
define('MOBILE_FEEDLIST_ENABLE_ICONS', false);
|
define('MOBILE_FEEDLIST_ENABLE_ICONS', false);
|
||||||
|
define('TTRSS_SESSION_NAME', 'ttrss_m_sid');
|
||||||
|
|
||||||
function render_feeds_list($link) {
|
function render_feeds_list($link) {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?
|
<?
|
||||||
// require_once "sessions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
require_once "../version.php";
|
require_once "../version.php";
|
||||||
require_once "../config.php";
|
require_once "../config.php";
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
$password = $_POST["password"];
|
$password = $_POST["password"];
|
||||||
$return_to = $_POST["rt"];
|
$return_to = $_POST["rt"];
|
||||||
|
|
||||||
if ($_COOKIE["ttrss_sid"]) {
|
if ($_COOKIE[get_session_cookie_name()]) {
|
||||||
require_once "../sessions.php";
|
require_once "../sessions.php";
|
||||||
if ($_SESSION["uid"]) {
|
if ($_SESSION["uid"]) {
|
||||||
initialize_user_prefs($link, $_SESSION["uid"]);
|
initialize_user_prefs($link, $_SESSION["uid"]);
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<?
|
<?
|
||||||
require_once "../sessions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
require_once "../config.php";
|
require_once "../config.php";
|
||||||
require_once "../functions.php";
|
require_once "../functions.php";
|
||||||
|
require_once "../sessions.php";
|
||||||
|
|
||||||
logout_user();
|
logout_user();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?
|
<?
|
||||||
require_once "../functions.php";
|
require_once "../config.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
require_once "../functions.php";
|
||||||
|
|
||||||
basic_nosid_redirect_check();
|
basic_nosid_redirect_check();
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
require_once "db.php";
|
require_once "db.php";
|
||||||
|
|
||||||
$session_expire = SESSION_EXPIRE_TIME; //seconds
|
$session_expire = SESSION_EXPIRE_TIME; //seconds
|
||||||
|
$session_name = (!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME;
|
||||||
|
|
||||||
ini_set("session.gc_probability", 50);
|
ini_set("session.gc_probability", 50);
|
||||||
ini_set("session.name", "ttrss_sid");
|
ini_set("session.name", $session_name);
|
||||||
ini_set("session.use_only_cookies", true);
|
ini_set("session.use_only_cookies", true);
|
||||||
ini_set("session.gc_maxlifetime", SESSION_EXPIRE_TIME);
|
ini_set("session.gc_maxlifetime", SESSION_EXPIRE_TIME);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue