1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 05:05:56 +00:00

pluginhandler: reject method requests without CSRF

This commit is contained in:
Andrew Dolgov
2021-02-17 15:04:39 +03:00
parent 2b2833bb4f
commit 7be1e3ed38

View File

@@ -14,8 +14,8 @@ class PluginHandler extends Handler_Protected {
if (validate_csrf($csrf_token)) {
$plugin->$method();
} else {
user_error("Requested ${plugin_name}->${method}() with invalid CSRF token.", E_USER_DEPRECATED);
$plugin->$method();
user_error("Rejected ${plugin_name}->${method}(): invalid CSRF token.", E_USER_WARNING);
print error_json(6);
}
} else {
user_error("Rejected ${plugin_name}->${method}(): unknown method.", E_USER_WARNING);