Add hook to fix malformed passwords