plugins/mail: remove secretkey stuff
This commit is contained in:
parent
d0eef2a3b0
commit
83b1ddafef
|
@ -32,11 +32,6 @@ class Mail extends Plugin {
|
||||||
|
|
||||||
$param = db_escape_string($this->link, $_REQUEST['param']);
|
$param = db_escape_string($this->link, $_REQUEST['param']);
|
||||||
|
|
||||||
$secretkey = sha1(uniqid(rand(), true));
|
|
||||||
|
|
||||||
$_SESSION['email_secretkey'] = $secretkey;
|
|
||||||
|
|
||||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"secretkey\" value=\"$secretkey\">";
|
|
||||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pluginhandler\">";
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pluginhandler\">";
|
||||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"plugin\" value=\"mail\">";
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"plugin\" value=\"mail\">";
|
||||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"sendEmail\">";
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"sendEmail\">";
|
||||||
|
@ -135,15 +130,10 @@ class Mail extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendEmail() {
|
function sendEmail() {
|
||||||
$secretkey = $_REQUEST['secretkey'];
|
|
||||||
|
|
||||||
require_once 'classes/ttrssmailer.php';
|
require_once 'classes/ttrssmailer.php';
|
||||||
|
|
||||||
$reply = array();
|
$reply = array();
|
||||||
|
|
||||||
if ($_SESSION['email_secretkey'] &&
|
|
||||||
$secretkey == $_SESSION['email_secretkey']) {
|
|
||||||
|
|
||||||
$_SESSION['email_secretkey'] = '';
|
$_SESSION['email_secretkey'] = '';
|
||||||
|
|
||||||
$replyto = strip_tags($_SESSION['email_replyto']);
|
$replyto = strip_tags($_SESSION['email_replyto']);
|
||||||
|
@ -168,10 +158,6 @@ class Mail extends Plugin {
|
||||||
$reply['message'] = "UPDATE_COUNTERS";
|
$reply['message'] = "UPDATE_COUNTERS";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
$reply['error'] = "Not authorized.";
|
|
||||||
}
|
|
||||||
|
|
||||||
print json_encode($reply);
|
print json_encode($reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue