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

Add search operation model for JSONB #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cdelafuente-r7
Copy link

This adds Metasploit::Model::Search::Operation::Jsonb to be able to search within a JSONB.

It transforms the search value to a valid JSON if it contains a colon (e.g. key:value). It returns the String if not. Also, the first colon is used as a delimiter between the key and the value. Any subsequent colon will be part of the value. It also handles double/single quotes to escape any colon that are not suppose to be a delimiter between the key and the value.

@@ -9,6 +9,9 @@ end

# used by dummy application
group :development, :test do
# Temporary, remove once the Rails 7.1 update is complete
# see: https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror
gem 'concurrent-ruby', '1.3.4'
Copy link
Author

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

1 participant