CSRF attack detected using jq_link_to_remote

70 views
Skip to first unread message

panchogg

unread,
Sep 18, 2010, 1:47:21 AM9/18/10
to sfJqueryReloadedPlugin
hey people... i need help....

i am using:

<?php echo jq_link_to_remote('Eliminar', array(
'url' => url_for('items_delete',$itemMedico),
'method' => 'get',
'script' => 'true',
'csrf' => '1',
'confirm' => '¿Estás seguro de borrar?',
'loading' => "$('#borrando_".$i."').show()",
'complete' => "recargarLista()",
)) ?>

with this action:

public function executeDeleteItem(sfWebRequest $request)
{
//TODO: Activar CSRFProtection cuando sepa como pegarselo al
delete AJAX
$request->checkCSRFProtection();

$this->forward404Unless($item = Doctrine::getTable('Item')-
>find(array($request->getParameter('id'))), sprintf('Objeto ítem no
existe (%s).', $request->getParameter('id')));
$item->delete();

return $this->renderText('');
}

AND... a get this error sometimes...

_csrf_token [CSRF attack detected.]

panchogg

unread,
Sep 26, 2010, 2:25:04 PM9/26/10
to sfJqueryReloadedPlugin
some one??

I am building a solution....can you add into the plugin???

(Yes, iI konw, my English is bad)

where can I see.... the developer code of the plugin??'

Tom Boutell

unread,
Sep 26, 2010, 2:26:51 PM9/26/10
to sfjqueryrel...@googlegroups.com
Symfony plugins are PHP. The developer code is right in your plugins
folder. The source code is maintained in the symfony plugins svn like
most other Symfony plugins. Nothing is hiding from you (:

--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

panchogg

unread,
Sep 26, 2010, 4:50:42 PM9/26/10
to sfJqueryReloadedPlugin
thank you... I ask because just found 1.2 version...and the plugin is
1.4x

when the new version???

Tom Boutell

unread,
Sep 26, 2010, 5:22:15 PM9/26/10
to sfjqueryrel...@googlegroups.com
? Version 1.4.3 is on the symfony plugins page for this plugin, ready
for downloading.

The latest code is always in the svn trunk.

--

Reply all
Reply to author
Forward
0 new messages