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

Fix undefined method error in /api/v1/modules endpoint #18712

Merged

Conversation

ekalinichev-r7
Copy link
Contributor

@ekalinichev-r7 ekalinichev-r7 commented Jan 17, 2024

Closes #18472 by extending Msf::WebServices with Msf::WebServices::ModuleSearch that was originally present there but was accidentally removed

Paired with @dwelch-r7 and @adfoster-r7

Verification

List the steps needed to make sure this thing works

  • Start msfdb webservice: msfdb --component webservice --address 0.0.0.0 start
  • Navigate to http://localhost:5443/api/v1/modules?name=aux
  • Verify response includes list of modules
  • Verify no error

@ekalinichev-r7 ekalinichev-r7 added rn-fix release notes fix database labels Jan 17, 2024
@@ -1,3 +1,3 @@
module Msf::WebServices

extend Msf::WebServices::ModuleSearch
Copy link
Contributor

Choose a reason for hiding this comment

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

Context: This was code was accidentally lost in a previous code shuffle here: 1617b3e#diff-14dba8397537f8e93680797413000a4cebec4393efb7f047a46fb0e997dc9719

@adfoster-r7 adfoster-r7 merged commit 4921f6b into rapid7:master Jan 22, 2024
59 checks passed
@adfoster-r7
Copy link
Contributor

Release notes

Fixes a crash with Metasploit's REST api when calling /api/v1/modules?name=aux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database rn-fix release notes fix
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

An error with message "undefined method `search_modules' for Msf::WebServices:Module" when call REST API
2 participants