-
Notifications
You must be signed in to change notification settings - Fork 58
Specify YAML coder for mdm payload #211
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
Conversation
dea65af to
e4cdb04
Compare
e4cdb04 to
b5f7406
Compare
|
|
||
| class Event < ApplicationRecord | ||
| serialize :info | ||
| if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're tab indented here for some reason, ignore the formatting it looks normal in the IDE, file was orinigally tabs so not going to change that
f8efb0a to
86e1602
Compare
86e1602 to
8458eea
Compare
8458eea to
cb882a2
Compare
| if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1 | ||
| serialize :urls, coder: YAML | ||
| else | ||
| serialize :urls | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since specifying coder: is a noop, and the old code didn't specify any coder, this if/else statementi s kind of redundant, I did add in an explicit serialize :urls, YAML but that broke the tests and it makes more sense to keep the old functionality the same as it was before
I don't mind keeping it here, since it makes it obvious what the intention is
We need to specify a coder here to be compatible with Rails 7.1
Tested as part of the framework PR rails 7.1 here: rapid7/metasploit-framework#19953
Rails 7.0 here: rapid7/metasploit-framework#19977