atc0005 / go-nagios

Shared Golang package for Nagios plugins
MIT License
8 stars 3 forks source link

`ExitState.ServiceOutput` is (incorrectly) interpreted as containing format specifier #139

Closed atc0005 closed 2 years ago

atc0005 commented 2 years ago

As noted in https://github.com/atc0005/check-vmware/issues/725#issuecomment-1247908172, the v0.9.1 release contains an unintentional change that attempts to apply formatting to literal content. The regression reappeared in the v0.9.0 release.

As of the v0.8.2 release (correct):

https://github.com/atc0005/go-nagios/blob/8d5ac27dca0f1379b782b72ee7bfcdf83cf8d5f4/nagios.go#L272-L277

As of the v0.9.1 release (incorrect):

https://github.com/atc0005/go-nagios/blob/3d6cd8f67714449034ac00ab03c0860482d5173c/nagios.go#L335-L340

This produces unexpected results when preformatted ServiceOutput content is subjected to another formatting attempt.

atc0005 commented 2 years ago

This is a repeat of: