craigh / PostCalendar

PostCalendar is a calendar module for the Zikula Application Framework
20 stars 9 forks source link

HookHandlers::postcalendarhookconfigprocess() #77

Closed cmfcmf closed 11 years ago

cmfcmf commented 11 years ago

HookHandlers::postcalendarhookconfigprocess() breaks core functionality. You register this Event handler like so:

EventUtil::registerPersistentModuleHandler('PostCalendar', 'controller.method_not_found', array('PostCalendar_HookHandlers', 'postcalendarhookconfigprocess'));

This means the hook listener is executed every time the core does not find a function. PostCalender than has the following lines:

        if (!SecurityUtil::validateCsrfToken($token)) {
            throw new Zikula_Exception_Forbidden(__('Security token validation failed', $dom));
        }

These throw an error mostly, because there is of course no csrf token. This results in an empty page with the only message: Security token validation failed.

So please remove or change the way the function works or remove it entirely (For me it looks like some outdated Hooks stuff?).

craigh commented 11 years ago

this is fixed in https://github.com/craigh/PostCalendar/commit/42b601f367292a441549fb9fbb39b37701831e53

I caught it while working on Dizkus :wink: