Skip to content

Commit

Permalink
#70 Token fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Puguh Wijayanto committed Feb 12, 2017
1 parent 5eb86f5 commit 64abcca
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/lib/Comments.class.php
Expand Up @@ -96,7 +96,7 @@ public static function addComment($vars)

unset($vars['addComment']);
$token = Typo::cleanX($vars['token']);
if (!isset($vars['token']) || !Token::isExist($token)) {
if (!isset($vars['token']) || !Token::validate($token)) {
$alertDanger[] = TOKEN_NOT_EXIST;
}
if (!isset($vars['comments-msg']) || null == $vars['comments-msg'] || $vars['comments-msg'] == '<p><br></p>') {
Expand Down
1 change: 0 additions & 1 deletion inc/lib/Control/Backend/tags.control.php
Expand Up @@ -96,7 +96,6 @@
if (isset($alertDanger)) {
$data['alertDanger'] = $alertDanger;
} else {
echo "Detel";
Categories::delete(Typo::int($_GET['id']));
$data['alertSuccess'][] = MSG_TAG_REMOVED;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/mod/contact-form/inc/Contact.lib.php
Expand Up @@ -24,7 +24,7 @@ public static function contactPage($data)
switch ($_POST['sendMessage']){
case true:
$token = Typo::cleanX($_POST['token']);
if (!isset($_POST['token']) || !Token::isExist($token)){
if (!isset($_POST['token']) || !Token::validate($token)){
$alertDanger[] = TOKEN_NOT_EXIST;
}
if (Xaptcha::isEnable()) {
Expand Down
2 changes: 1 addition & 1 deletion inc/mod/newsletter/options.php
Expand Up @@ -3,7 +3,7 @@
if (isset($_POST['sendmail'])) {
// check token first
$token = Typo::cleanX($_POST['token']);
if (!isset($_POST['token']) || !Token::isExist($token)) {
if (!isset($_POST['token']) || !Token::validate($token)) {
$alertDanger[] = TOKEN_NOT_EXIST;
}
if (isset($alertDanger)) {
Expand Down

0 comments on commit 64abcca

Please sign in to comment.