diff options
author | Andrew Dolgov <[email protected]> | 2019-12-20 18:17:50 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-12-20 18:17:50 +0300 |
commit | 021757ad5cccffb2030539a871e8117648eb5eae (patch) | |
tree | 0e45c5c23efe61509f7405ec59a2cb6fe5375a8d | |
parent | fdb1fc760846e523c64ef10bd89f046580b6d9cb (diff) | |
parent | 63ee91c82e3fa17f5ade147aff8d319104b9e52e (diff) |
Merge branch 'master' of git.tt-rss.org:fox/tt-rss
-rw-r--r-- | backend.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backend.php b/backend.php index cb158f705..e65ce1b94 100644 --- a/backend.php +++ b/backend.php @@ -98,10 +98,13 @@ if ($override) { $handler = $override; } else { - $handler = new $op($_REQUEST); + $reflection = new ReflectionClass($op); + $handler = $reflection->newInstanceWithoutConstructor(); } if ($handler && implements_interface($handler, 'IHandler')) { + $handler->__construct($_REQUEST); + if (validate_csrf($csrf_token) || $handler->csrf_ignore($method)) { if ($handler->before($method)) { if ($method && method_exists($handler, $method)) { |