mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-16 08:25:57 +00:00
pluginhandler: reject method requests without CSRF
This commit is contained in:
@@ -14,8 +14,8 @@ class PluginHandler extends Handler_Protected {
|
|||||||
if (validate_csrf($csrf_token)) {
|
if (validate_csrf($csrf_token)) {
|
||||||
$plugin->$method();
|
$plugin->$method();
|
||||||
} else {
|
} else {
|
||||||
user_error("Requested ${plugin_name}->${method}() with invalid CSRF token.", E_USER_DEPRECATED);
|
user_error("Rejected ${plugin_name}->${method}(): invalid CSRF token.", E_USER_WARNING);
|
||||||
$plugin->$method();
|
print error_json(6);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
user_error("Rejected ${plugin_name}->${method}(): unknown method.", E_USER_WARNING);
|
user_error("Rejected ${plugin_name}->${method}(): unknown method.", E_USER_WARNING);
|
||||||
|
|||||||
Reference in New Issue
Block a user