From: "byroot (Jean Boussier) via ruby-core" Date: 2024-03-27T08:50:31+00:00 Subject: [ruby-core:117343] [Ruby master Feature#20396] ObjectSpace.dump_all(string_value: false): skip dumping the String contents Issue #20396 has been updated by byroot (Jean Boussier). > false on default is safer? Agreed. Safer and faster. I only set it to `true` on default to not change the current behavior, but wouldn't mind flipping it to `false` by default. ---------------------------------------- Feature #20396: ObjectSpace.dump_all(string_value: false): skip dumping the String contents https://bugs.ruby-lang.org/issues/20396#change-107501 * Author: byroot (Jean Boussier) * Status: Open ---------------------------------------- `ObjectSpace.dump_all` is a very useful method to debug memory leaks and such, hence is frequently needed in production. But since all the 7bit strings content is included in the dump, it incur the risk of leaking personal data, or secrets. Also, in many case the strings content isn't that helpful and is just making the dump much bigger for no good reason. And only pure-ASCII strings are dumped this way, which means all the tools that process these dumps should already be compatible with a dump without any string content. ### Feature I propose to add another optional parameter to `dump_all`: `string_value: false`. When passed, no String content is ever dumped regardless of its coderange. Implementation: https://github.com/ruby/ruby/pull/10382 cc @zzak -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/