add a requirement not to register the secret password with null character(fixes #3504)