[4.2] Validate passwords more safely

As requested. https://github.com/laravel/framework/pull/5148