-
Petrik authored
If anyone calls a message encryptor in the console it will show the secret of the encryptor. By overriding the `inspect` method to only show the class name we can avoid accidentally outputting sensitive information. Before: ```ruby ActiveSupport::MessageEncryptor.new(secret, cipher: "aes-256-gcm").inspect "#<ActiveSupport::MessageEncryptor:0x0000000104888038 ... @secret=\"\\xAF\\bFh]LV}q\\nl\\xB2U\\xB3 ... >" ``` After: ```ruby ActiveSupport::MessageEncryptor.new(secret, cipher: "aes-256-gcm").inspect "#<ActiveSupport::MessageEncryptor:0x0000000104888038>" ```
Petrik authoredIf anyone calls a message encryptor in the console it will show the secret of the encryptor. By overriding the `inspect` method to only show the class name we can avoid accidentally outputting sensitive information. Before: ```ruby ActiveSupport::MessageEncryptor.new(secret, cipher: "aes-256-gcm").inspect "#<ActiveSupport::MessageEncryptor:0x0000000104888038 ... @secret=\"\\xAF\\bFh]LV}q\\nl\\xB2U\\xB3 ... >" ``` After: ```ruby ActiveSupport::MessageEncryptor.new(secret, cipher: "aes-256-gcm").inspect "#<ActiveSupport::MessageEncryptor:0x0000000104888038>" ```
Loading