You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have an object that includes JSON::Serializable, and that object also uses memoize in there, Lucky will create an instance variable for that memorized method:
One thing I just thought of... We can easily consider JSON since it's already included in the framework anyway... but what about YAML? That's also included in the framework, so I assume YAML::Serializable works the same... but are there others? What about DB::Serializable? We can't guarantee you're using that, and it may suffer from the same issue. That would have to be one where you manually set an ignore; however, if you ignore it, how do we know to apply to the instance variable, and not the method?
If you have an object that includes
JSON::Serializable
, and that object also usesmemoize
in there, Lucky will create an instance variable for that memorized method:lucky/src/lucky/memoizable.cr
Line 43 in ab0db6a
Serializable takes all instances variables and adds them to the whole JSON document. You can sort of see an example here:
Notice that when the
server
is printed out, the json also includes the memoized value. This is almost certainly unintended data being shipped over.However, there may come a time where you actually do want to send that value... In that case, we need to make sure to allow for the opt-in
The text was updated successfully, but these errors were encountered: