Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-hardware-fail errors when dmesg contains characters not valid for utf-8 #7

Open
cwjohnston opened this issue Nov 8, 2017 · 0 comments

Comments

@cwjohnston
Copy link

As reported by a Sensu Enterprise user:

bash-4.1$ /opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/check-hardware-fail.rb
Check failed to run: invalid byte sequence in UTF-8, 
["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-hardware-1.1.0/bin/check-hardware-fail.rb:55:in `[]'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-hardware-1.1.0/bin/check-hardware-fail.rb:55:in `block in run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-hardware-1.1.0/bin/check-hardware-fail.rb:55:in `select'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-hardware-1.1.0/bin/check-hardware-fail.rb:55:in `run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-plugin/cli.rb:58:in `block in '"]

I think we can address this with some input sanitization, as described here https://robots.thoughtbot.com/fight-back-utf-8-invalid-byte-sequences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant