views:

34

answers:

2

Hi, I would like to see how Joomla / Drupal do their validation / security, where are the input validation scripts located?

A: 

There isn't a single/central validation code for user's input in Drupal. Each form as it own validations handlers, search for *_validate* in the Drupal API. In addition, there is some re-usable validation functions such as valid_url() and valid_email_address(). Drupal also encourage output sanitization with functions such as t(), check_plain() or filter_xss(). Drupal discourage bad-practive regarding SQL injection by favoring placeholders in query string, see db_query().

mongolito404