Issue #1558468 by chx, jwineinger, linclark, Berdir: Fixed SA-CORE-2012-002 - Denial of Service, forward port from 7.x