Return comments for hosts over RPC#21289
Merged
adfoster-r7 merged 1 commit intorapid7:masterfrom Apr 15, 2026
Merged
Conversation
sjanusz-r7
commented
Apr 14, 2026
| host[:updated_at] = h.updated_at.to_i | ||
| host[:purpose] = h.purpose.to_s | ||
| host[:info] = h.info.to_s | ||
| host[:comments] = h.comments.to_s |
Contributor
Author
There was a problem hiding this comment.
Other lines here use .to_s as well, resulting in an empty string instead of a nil value. This follows a pattern, but unsure if the .to_s should be dropped (nil vs. empty string).
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the db.hosts RPC response so host records include their comments field, aligning RPC output with what hosts shows in msfconsole and addressing issue #21247.
Changes:
- Add
commentsto each host entry returned byrpc_hostsin the RPC DB API.
20b6239 to
4383ad6
Compare
adfoster-r7
approved these changes
Apr 15, 2026
Contributor
Release NotesUpdates the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21247
Tested in Pro. No impact, everything works. We don't display host comments anywhere in Pro's UI.
Before
No comment
After
With a comment
Verification
List the steps needed to make sure this thing works
hosts -a x.x.x.xhosts -m "this is an example comment" x.x.x.xload msgrpc"comments"=>""