Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
2k stars 574 forks source link

Strip '\r' in notification messages to avoid 'Content-Type: application/octet-stream' #10061

Closed Al2Klimov closed 3 months ago

Al2Klimov commented 4 months ago

Without this patch, an accidential \r in e.g. $NOTIFICATIONCOMMENT leads to a Content-Type: application/octet-stream header in e-mails. The accidential \r might slip in usually using Icinga/Nagios apps...

fixes #7510 ref/IP/52453

This is a cherry-pick of #6369.

Al2Klimov commented 4 months ago

Tested by https://github.com/Icinga/icinga2/issues/7510#issuecomment-534619092 👍

robert-scheck commented 4 months ago

As the author of #7184 it's interesting and sad to see that it got reverted later by a wrong analysis. My PR did not change anything Bash or Dash related, the Debian-reported breakage/issue existed before already. So, thank you, @Al2Klimov, for the second attempt 5 years after mine.

Oh, by the way: Do I need to sign the CLA even the same PR was initially accepted about 5 years ago already? If so, please let me know explicitly what you expect.

Al2Klimov commented 4 months ago

At least it would be nice if you sign it.

Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA.

After that, please reply here with a comment and we'll verify.