Duplicated logic, this already exists in the proxy password validation.