--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.
KorzoIf you feel the tutorial is not clear enough or can be worded better, please improve it.ThanksTom
On Sat, Jun 21, 2014 at 9:00 AM, Korzo <korz...@gmail.com> wrote:
Forget about tutorial you read and take a look at Joomla source code.JSession::getFormToken() returns token.This method has no parameter, unless you need new token. Then you pass true as parameter.JSession::checkToken() verifies, if token is valid and returns true or false. Parameter of this method is HTTP request method with default 'post'JHtml::_('form.token') returns :
<input type="hidden" name="' . JSession::getFormToken() . '" value="1" />
Take a look a look at example Viper posted before. There is all you need to post your data with ajax. You only need to handle response instead of alert it.
Then in your controller you can verify the token with:
JSession::checkToken() or jexit('Wrong token');
On Friday, June 20, 2014 10:36:16 AM UTC+2, Maik wrote:Mh ok, but have a look at: http://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-general+unsub...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.