Hi everybody [?]

I need the functionallity of the link_to() helper.

It  generates a link tag when clicked it triggers an Onclick event that
submit an embbeded form which is similar to:

<a href='#' onclick="if (confirm('Are you sure?'))
{
  var f = document.createElement('form');
  f.style.display = 'none'; this.parentNode.appendChild(f);
  f.method = 'post'; f.action = 'IDontKnow.php';
  var m = document.createElement('input');
m.setAttribute('type', 'hidden');
  m.setAttribute('name', 'token');
  m.setAttribute('value', '12345tfftr44lkj4l04');
  m.setAttribute('type', 'hidden');
  m.setAttribute('name', 'user');
  m.setAttribute('value', '1');
  f.appendChild(m);
  f.submit();
};
  return false;">Delete</a>


With Macros on twig I could implement a similar helper,
but the usefullness of link_to() is that it generates a CRF token to
validate the post value and prevent XSS attacks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

<<349.gif>>

Reply via email to