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