예제 #1
0
/**
 * Applies CSRF filter on Smarty template content. Can be 
 * used as a output filter.
 *
 * @param string $source
 * @param Smarty $smarty
 * @return CSRF filtered content
 */
function smarty_csrf_filter($source, &$smarty)
{
    return csrfguard_replace_forms($source);
}
예제 #2
0
function csrfguard_inject()
{
    $data = ob_get_clean();
    $data = csrfguard_replace_forms($data);
    echo $data;
}