[TYPO3-dev] formtoken backend problem
Sebastian May
s.may at decide.de
Wed Aug 24 00:07:19 CEST 2011
Hi,
Thank you very much for your answers.
But the Version from Benjamin worked.
$formToken = t3lib_BEfunc::getUrlToken('tceAction');
The other hint to the review Page was good, but when I tried, I got another
error:
Call to undefined method
t3lib_formprotection_BackendFormProtection::getFormProtection()
But this should be implemented in 4.5.5, or am I wrong?
Anyway the short version worked!
Thanks again!
--
Mit freundlichen Grüßen
Best Regards
Sebastian May
Hi,
I guess the wiki actually is outdated already as
https://review.typo3.org/#change,1364 changed the from protection API quite a bit again.
Björn
-----Ursprüngliche Nachricht-----
Von: typo3-dev-bounces at lists.typo3.org
[mailto:typo3-dev-bounces at lists.typo3.org] Im Auftrag von Benjamin Beck
Gesendet: Dienstag, 23. August 2011 17:06
An: List for Core-/Extension development
Betreff: Re: [TYPO3-dev] formtoken backend problem
Hi Sebastian,
have you tried adding the token with the t3lib_BEfunc::getUrlToken($formName);
I found this DOC for the $formname:
After introducing a protection, all extensions that provide backend modules using alt_doc.php, tce_db.php or tce_file.php need to provide a token in the URL or the form. This can be done by using the following code:
*alt_doc.php*
t3lib_TCEforms::getHiddenTokenField('editRecord');
// or
t3lib_BEfunc::getUrlToken('editRecord');
*tce_db.php*
t3lib_TCEforms::getHiddenTokenField('tceAction');
// or
t3lib_BEfunc::getUrlToken('tceAction');
*tce_file.php*
t3lib_TCEforms::getHiddenTokenField('tceFileAction');
// or
t3lib_BEfunc::getUrlToken('tceFileAction');
Benjamin
On Aug 23, 2011, at 4:51 PM, Sebastian May wrote:
> Hi,
>
> i've got a backend plugin that generates links for hiding objects, but
since
> the update to 4.5 these links aren't working anymore.
>
> This is what i get!
>
> Validating the security token of this form has failed. Please reload
> the form and submit it again.
>
>
>
> I've tried to generate the Token like the typo wiki shows how to do
> it,
and
> the links seems pretty much the same as in the list plugin, but they
aren't
> working.
>
> http://wiki.typo3.org/wiki/Pending_Documentation
>
>
>
> $formToken =
>
t3lib_formprotection_Factory::get()->generateToken('tx_comments_comments');
>
> And this parameter has to be part of the link, but it won't work.
>
>
>
> I tried to rebuild the links from the typo3-list plugin to hide a
> object within on click.
>
> And that worked fine until the update.
>
>
>
> Any suggestions?
>
>
>
>
>
> --
>
> Mit freundlichen Grüßen
>
> Best Regards
>
>
>
> Sebastian May
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
More information about the TYPO3-dev
mailing list