bug #4611 [security] DOS attack with long passwords

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
4.0.10.7 release

Signed-off-by: Marc Delisle <marc@infomarc.info>