mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 10:45:56 +00:00
* add (disabled) shortcut syntax for plugin methods
* add controls shortcut for pluginhandler tags * add similar shortcut for frontend * allow plugins to selectively exclude their methods from CSRF checking
This commit is contained in:
@@ -11,7 +11,7 @@ class PluginHandler extends Handler_Protected {
|
||||
|
||||
if ($plugin) {
|
||||
if (method_exists($plugin, $method)) {
|
||||
if (validate_csrf($csrf_token)) {
|
||||
if (validate_csrf($csrf_token) || $plugin->csrf_ignore($method)) {
|
||||
$plugin->$method();
|
||||
} else {
|
||||
user_error("Rejected ${plugin_name}->${method}(): invalid CSRF token.", E_USER_WARNING);
|
||||
|
||||
Reference in New Issue
Block a user