Issue #182: Backport SA-CORE-2012-004.

Pull request for https://github.com/backdrop/backdrop-issues/issues/182, backporting the security updates present in Drupal 7.18.