Sync randpass with sanitize_string()