summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-03-16 11:57:22 +0100
committerAndrew Dolgov <[email protected]>2006-03-16 11:57:22 +0100
commit7ae65adfc5dc8254bb2749af1f4e0ccc418406ec (patch)
tree365f5993f4f9fa33878b14e6950f2b55ea2ba1c3 /functions.php
parent720200957d8735a5281d7aafe5b04326bdb4619f (diff)
prevent setting session cookie when user not logged in and tt-rss.php/prefs.php is requested
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index a7a17f9b5..18546ca18 100644
--- a/functions.php
+++ b/functions.php
@@ -839,6 +839,17 @@
return true;
}
+ function basic_nosid_redirect_check() {
+ if (!SINGLE_USER_MODE) {
+ if (!$_COOKIE["ttrss_sid"]) {
+ $redirect_uri = get_login_redirect();
+ $return_to = preg_replace('/.*?\//', '', $_SERVER["REQUEST_URI"]);
+ header("Location: $redirect_uri?rt=$return_to");
+ exit;
+ }
+ }
+ }
+
function login_sequence($link) {
if (!SINGLE_USER_MODE) {