]> git.wh0rd.org Git - tt-rss.git/commitdiff
routing: check if created handler is a subclass of Handler
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 16 Aug 2012 11:43:52 +0000 (15:43 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 16 Aug 2012 11:43:52 +0000 (15:43 +0400)
backend.php

index b670451a48722d233cd1c64f03d85bb3d90fce1d..13568d1657d605277362672a7d6fe6fcac7f1049 100644 (file)
        if (class_exists($op)) {
                $handler = new $op($link, $_REQUEST);
 
-               if ($handler) {
+               if ($handler && is_subclass_of($handler, 'Handler')) {
                        if (validate_csrf($csrf_token) || $handler->csrf_ignore($method)) {
                                if ($handler->before($method)) {
                                        if ($method && method_exists($handler, $method)) {