Skip to content

Fix strict error handling in Markdown card templates#12661

Merged
bramkragten merged 1 commit intodevfrom
frenck-2022-0995
May 13, 2022
Merged

Fix strict error handling in Markdown card templates#12661
bramkragten merged 1 commit intodevfrom
frenck-2022-0995

Conversation

@frenck
Copy link
Copy Markdown
Member

@frenck frenck commented May 11, 2022

Proposed change

Adds strict error handling to the template rendering in the Markdown card.
Without it, things like undefined variables in template will end up in the Home Assistant logs (basically turning the Home Assistant log into a keylogger).

Ideally, this should be shipped in a patch release. I'm not sure how the frontend currently manages/classified PRs for that matter.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten
Copy link
Copy Markdown
Member

Should this just be done for markdown card, or by default?

@frenck
Copy link
Copy Markdown
Member Author

frenck commented May 11, 2022

Should this just be done for markdown card, or by default?

Good question... 🤷

@bramkragten bramkragten merged commit 6be6c71 into dev May 13, 2022
@bramkragten bramkragten deleted the frenck-2022-0995 branch May 13, 2022 11:17
@github-actions github-actions bot locked and limited conversation to collaborators May 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants