From 986a52106766e7497322951c2bf3a3cbd0b42bf9 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 25 Mar 2017 15:54:18 +0100 Subject: Add an endpoint to refresh the token Useful for AJAX requests which burns the token --- application/Router.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'application/Router.php') diff --git a/application/Router.php b/application/Router.php index c9a51912..f6896b1c 100644 --- a/application/Router.php +++ b/application/Router.php @@ -45,6 +45,8 @@ class Router public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin'; + public static $GET_TOKEN = 'token'; + /** * Reproducing renderPage() if hell, to avoid regression. * @@ -142,6 +144,10 @@ class Router return self::$PAGE_SAVE_PLUGINSADMIN; } + if (startsWith($query, 'do='. self::$GET_TOKEN)) { + return self::$GET_TOKEN; + } + return self::$PAGE_LINKLIST; } } -- cgit v1.2.3