Skip to content

Fix for double-JSON-encoding of table generation contexts (#77) #78

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

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

nickovs
Copy link
Contributor

@nickovs nickovs commented Feb 5, 2021

As described in issue #77, the context information passed to a table plugin's generate() method is (a) inconveniently double-encoded and (b) inconsistent in its data type (since it can either be a double-encoded string or an empty dictionary). This PR fixes this to always pass a dictionary, which will contain the unpacked context information if it was provided in the call.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 5, 2021

CLA Signed

The committers are authorized under a signed CLA.

Copy link
Member

@theopolis theopolis left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the analysis!

@theopolis theopolis merged commit 586c79f into osquery:master Feb 6, 2021
@nickovs
Copy link
Contributor Author

nickovs commented Feb 6, 2021

@theopolis Thank you for the swift response. Any chance that someone can push an updated version to PyPI so that the fix is more widely available?

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

Successfully merging this pull request may close these issues.

2 participants