SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 443 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The attacker may just be attempting to fill your database with
worthless information. If we include a hidden field in our forms with the name of the
token, we can check if the user is submitting data via a form with a valid session.
We can get the token using JUtility::getToken(). In our template, where we
render the form we want to secure, we add this:

When we call JUtility::getToken() we can optionally provide the Boolean
forceNew parameter. This will force the generation of a new token. Before doing
this we must consider the context in which we are calling the method. If there are
any other forms present on the page that also use the token we may inadvertently
prevent these from working. Components are always rendered first so are generally
safer when forcing a new token.
Now all we need to do is verify the token when we receive a request from the form
that we are trying to secure. In this example we specifically get the token from the
$_POST hash, guaranteeing that the token came via the correct method.


Pages:
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6