Fix/security extra message wrapping #8231
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes issue #8192,
In security event configuration, if admin wish to use a variable in additional email message, it will be ignored during template parsing stage during the config loading stage. This is a fix to avoid this.
Impacts
changed default behavior of using variables in extra message in security event email template.
In the admin UI, admins still use [% variable_name %] to wrap the variable, but in the backend, we use another layer to wrap the variable once more to avoid this to be parsed to null when loading config files.
Issue
fixes #8192
Delete branch after merge
YES
Checklist
Bug Fixes
fixes the issue that a variable is not parsed in extra message in security event's template. #8192