Hide YAML content on syntax errors when a vault password is specified

Fixes #6601