jbonofre opened a new pull request, #764:
URL: https://github.com/apache/karaf-decanter/pull/764

   ## Summary
   - Remove `/` as the Velocity `FILE_RESOURCE_LOADER_PATH` in 
`EmailFormatter`; only enable the `file` resource loader when 
`templates.directory` is configured (scoped to that directory) and enable 
Velocity's `SecureUberspector`.
   - Disable event-level template selection (`subject.template.location`, 
`body.template.location`) by default (`allow.event.template.location=false`). 
When explicitly enabled, require `templates.directory` to be configured and 
validate that relative paths resolve inside its canonical path without 
traversal or symlink escapes.
   - Disable event-level overrides for email properties (`from`, `to`, `cc`, 
`bcc`, `body.type`, and `alert.email.*`) by default 
(`allow.event.email.properties=false`), and reject/sanitize CR/LF characters in 
email headers and subjects.
   - Update default configuration 
(`org.apache.karaf.decanter.alerting.email.cfg`) and manual documentation 
(`alerting.adoc`).
   - Update `EmailFormatterTest` and add `EmailAlerterTest`.
   
   ## Testing
   - `mvn test package -pl alerting/alerter/email` (15 tests: 4 in 
`EmailAlerterTest`, 11 in `EmailFormatterTest`, 0 failures)
   - `mvn package -pl manual -DskipTests`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] Harden email alerter agai... jbonofre (via GitHub) via issues

Reply via email to