Issue #161: Backport security fixes from Drupal 7.26, SA-CORE-2014-001.
Merge pull request #170 from quicksketch/SA-CORE-2014-001

Issue #161: Backport security fixes from Drupal 7.26, SA-CORE-2014-001.