From f0a8aca6e10064fb16daefff9e22dcc20a831868 Mon Sep 17 00:00:00 2001 From: Charlie Smurthwaite Date: Mon, 15 May 2023 00:52:32 +0100 Subject: [PATCH] fix: duplicate string before modifying it to prevent frozen string errors --- lib/postal/message_db/delivery.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/postal/message_db/delivery.rb b/lib/postal/message_db/delivery.rb index e5d0e8c..f06c76b 100644 --- a/lib/postal/message_db/delivery.rb +++ b/lib/postal/message_db/delivery.rb @@ -48,7 +48,7 @@ module Postal message: @message.webhook_hash, status: status, details: details, - output: output.to_s.force_encoding("UTF-8").scrub.truncate(512), + output: output.to_s.dup.force_encoding("UTF-8").scrub.truncate(512), sent_with_ssl: sent_with_ssl, timestamp: @attributes["timestamp"], time: time