1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

vérificatio CSRF et mise en page

This commit is contained in:
nicosomb 2013-04-15 14:09:58 +02:00
parent 358ab47957
commit cf3180f6b8
9 changed files with 125 additions and 50 deletions

View file

@ -10,12 +10,16 @@
include dirname(__FILE__).'/inc/config.php';
$action = (isset ($_GET['action'])) ? htmlspecialchars($_GET['action']) : '';
$view = (isset ($_GET['view'])) ? htmlspecialchars($_GET['view']) : 'index';
$id = (isset ($_GET['id'])) ? htmlspecialchars($_GET['id']) : '';
$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
$view = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
$id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
$url = (isset ($_GET['url'])) ? $_GET['url'] : '';
$token = (isset ($_POST['token'])) ? $_POST['token'] : '';
if ($action != '') {
action_to_do($action, $id, $url, $token);
}
action_to_do($action, $id);
$entries = display_view($view);
$tpl->assign('title', 'poche, a read it later open source system');
@ -23,4 +27,5 @@ $tpl->assign('view', $view);
$tpl->assign('poche_url', get_poche_url());
$tpl->assign('entries', $entries);
$tpl->assign('load_all_js', 1);
$tpl->assign('token', $_SESSION['token_poche']);
$tpl->draw('home');