Verify key each time for subscriptions
This commit is contained in:
parent
0d057763b9
commit
a46dbced75
|
@ -13,9 +13,9 @@
|
||||||
$accessfile=$logdir.'/access.log';
|
$accessfile=$logdir.'/access.log';
|
||||||
throttle_hits();
|
throttle_hits();
|
||||||
if(isset($_COOKIE['mail_name'])) {
|
if(isset($_COOKIE['mail_name'])) {
|
||||||
$user = strtolower($_COOKIE['mail_name']);
|
if($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) {
|
||||||
$userfile=$spooldir.'/'.$user.'-articleviews.dat';
|
$userfile=$spooldir.'/'.strtolower($_COOKIE['mail_name']).'-articleviews.dat';
|
||||||
$userdata = unserialize(file_get_contents($userfile));
|
}
|
||||||
}
|
}
|
||||||
// register parameters
|
// register parameters
|
||||||
$id=$_REQUEST["id"];
|
$id=$_REQUEST["id"];
|
||||||
|
|
|
@ -572,13 +572,9 @@ function groups_show($gruppen) {
|
||||||
$subs = array();
|
$subs = array();
|
||||||
$nonsubs = array();
|
$nonsubs = array();
|
||||||
$user = null;
|
$user = null;
|
||||||
$pkey_config = get_user_config(strtolower($_COOKIE['mail_name']), "pkey");
|
|
||||||
$pkey_cookie = $_COOKIE['pkey'];
|
|
||||||
if(isset($_COOKIE['mail_name'])) {
|
if(isset($_COOKIE['mail_name'])) {
|
||||||
if($pkey_config == $pkey_cookie) {
|
if($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) {
|
||||||
$user = strtolower($_COOKIE['mail_name']);
|
$userfile=$spooldir.'/'.strtolower($_COOKIE['mail_name']).'-articleviews.dat';
|
||||||
$userfile=$spooldir.'/'.$user.'-articleviews.dat';
|
|
||||||
$userdata = unserialize(file_get_contents($userfile));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for($i = 0 ; $i < $c ; $i++) {
|
for($i = 0 ; $i < $c ; $i++) {
|
||||||
|
@ -1586,6 +1582,19 @@ $logfile=$logdir.'/newsportal.log';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_user_mail_auth_data($user) {
|
||||||
|
global $spooldir;
|
||||||
|
$user = strtolower($user);
|
||||||
|
$pkey_config = get_user_config($user, "pkey");
|
||||||
|
$pkey_cookie = $_COOKIE['pkey'];
|
||||||
|
if($pkey_config == $pkey_cookie) {
|
||||||
|
$userfile=$spooldir.'/'.$user.'-articleviews.dat';
|
||||||
|
$userdata = unserialize(file_get_contents($userfile));
|
||||||
|
return $userdata;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function get_data_from_msgid($msgid) {
|
function get_data_from_msgid($msgid) {
|
||||||
global $spooldir;
|
global $spooldir;
|
||||||
$database = $spooldir.'/articles-overview.db3';
|
$database = $spooldir.'/articles-overview.db3';
|
||||||
|
|
|
@ -29,10 +29,11 @@
|
||||||
|
|
||||||
throttle_hits();
|
throttle_hits();
|
||||||
if(isset($_COOKIE['mail_name'])) {
|
if(isset($_COOKIE['mail_name'])) {
|
||||||
$user = strtolower($_COOKIE['mail_name']);
|
if($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) {
|
||||||
$userfile=$spooldir.'/'.$user.'-articleviews.dat';
|
$userfile=$spooldir.'/'.strtolower($_COOKIE['mail_name']).'-articleviews.dat';
|
||||||
$userdata = unserialize(file_get_contents($userfile));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($frames_on) && $frames_on === true) {
|
if(isset($frames_on) && $frames_on === true) {
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -26,11 +26,12 @@ if(isset($_REQUEST["last"]))
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_COOKIE['mail_name'])) {
|
if(isset($_COOKIE['mail_name'])) {
|
||||||
$user = strtolower($_COOKIE['mail_name']);
|
if($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) {
|
||||||
$userfile=$spooldir.'/'.$user.'-articleviews.dat';
|
$userfile=$spooldir.'/'.strtolower($_COOKIE['mail_name']).'-articleviews.dat';
|
||||||
$userdata = unserialize(file_get_contents($userfile));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$thread_show["latest"]=true;
|
$thread_show["latest"]=true;
|
||||||
$title.= ' - '.$group;
|
$title.= ' - '.$group;
|
||||||
include "head.inc";
|
include "head.inc";
|
||||||
|
|
Loading…
Reference in New Issue