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

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