Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix Nil pointer references for WebSystemdSocket #127

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

ethan-gallant
Copy link
Contributor

Noticed this when working with https://github.com/Lusitaniae/apache_exporter

If you don't provide a boolean value for WebSystemdSocket (default false) calling ListenAndServe causes the application to SigSegv. This checks if it is nil before evaluating the boolean value.

@ethan-gallant ethan-gallant changed the title Fix potential Nil pointer reference for WebSystemdSocket Fix potential Nil pointer references for WebSystemdSocket Feb 17, 2023
@ethan-gallant ethan-gallant changed the title Fix potential Nil pointer references for WebSystemdSocket Fix Nil pointer references for WebSystemdSocket Feb 17, 2023
@ethan-gallant ethan-gallant force-pushed the master branch 3 times, most recently from 589e116 to 114ce37 Compare February 17, 2023 21:56
@SuperQ SuperQ requested a review from roidelapluie February 22, 2023 09:17
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a better check would be to make sure that there is at least one valid listener and error if there is none.

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@SuperQ
Copy link
Member

SuperQ commented Mar 8, 2023

This needs a DCO sign-off. You can use git commit -s --amend to add it.

@ethan-gallant
Copy link
Contributor Author

@SuperQ should be good to go. Squashed commits and amended to have the signature

@SuperQ SuperQ requested review from dswarbrick and roidelapluie and removed request for dswarbrick March 8, 2023 15:16
Signed-off-by: Ethan J. Gallant <ethan.gallant@acquia.com>

Co-authored-by: William Van Hevelingen <William.VanHevelingen@acquia.com>

Co-authored-by: Stephanie Palis <35511514+stephpalis@users.noreply.github.com>
change to var
@roidelapluie roidelapluie merged commit 54d6390 into prometheus:master Mar 9, 2023
@roidelapluie
Copy link
Member

Thanks!

SuperQ added a commit that referenced this pull request May 1, 2023
* [FEATURE] Client TLS: Add option to require a specific Subject Alternate Names #126
* [FEATURE] Add a POST form to the landing page #144
* [FEATURE] Add generic customization to landing page #146
* [ENHANCEMENT] Add a Content-Type header to the landing page #142
* [BUGFIX] Fix Nil pointer references for WebSystemdSocket #127

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request May 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants