Skip to content

Commit e20d741

Browse files
committed
Require token for ajax (thanks to @cdnmall).
1 parent 3bc5ef1 commit e20d741

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/js/events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ VE.navigation.switch_menu = function(position){
387387
VE.notifications.get_list = function(){
388388
/// TODO get notifications only once
389389
$.ajax({
390-
url: "/list/notifications/?ajax=1",
390+
url: "/list/notifications/?ajax=1&token="+$('#token').attr('token'),
391391
dataType: "json"
392392
}).done(function(data) {
393393
var acc = [];

web/list/notifications/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
66

77

8-
if($_REQUEST['ajax'] == 1){
8+
if($_REQUEST['ajax'] == 1 && $_REQUEST['token'] == $_SESSION['token']){
99
// Data
1010
exec (HESTIA_CMD."v-list-user-notifications $user json", $output, $return_var);
1111
$data = json_decode(implode('', $output), true);

0 commit comments

Comments
 (0)