Skip to content

Commit

Permalink
Truncate 'output' field to avoid overflowing varchar(512) in database
Browse files Browse the repository at this point in the history
  • Loading branch information
catphish committed Mar 13, 2023
1 parent d0db134 commit a188a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/postal/message_db/delivery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def webhook_hash
:message => @message.webhook_hash,
:status => self.status,
:details => self.details,
:output => self.output.to_s.force_encoding('UTF-8').scrub,
:output => self.output.to_s.force_encoding('UTF-8').scrub.truncate(512),
:sent_with_ssl => self.sent_with_ssl,
:timestamp => @attributes['timestamp'],
:time => self.time
Expand Down

0 comments on commit a188a16

Please sign in to comment.