From 13854f7fa7ba4dbbe8a74f010af39b2fffe601eb Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 5 Apr 2019 18:18:34 +0200 Subject: [PATCH] Improved message_id generation (more random). --- app/models/observer/ticket/article/fillup_from_email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/observer/ticket/article/fillup_from_email.rb b/app/models/observer/ticket/article/fillup_from_email.rb index 735366556..5d061e397 100644 --- a/app/models/observer/ticket/article/fillup_from_email.rb +++ b/app/models/observer/ticket/article/fillup_from_email.rb @@ -38,7 +38,7 @@ class Observer::Ticket::Article::FillupFromEmail < ActiveRecord::Observer # generate message id, force it in prodution, in test allow to set it for testing reasons if !record.message_id || Rails.env.production? fqdn = Setting.get('fqdn') - record.message_id = "<#{DateTime.current.to_s(:number)}.#{record.ticket_id}.#{rand(999_999)}@#{fqdn}>" + record.message_id = "<#{DateTime.current.to_s(:number)}.#{record.ticket_id}.#{rand(999_999_999_999)}@#{fqdn}>" end # generate message_id_md5