Defect #18864
closedtroubles in email notifications (Redmine 2.5.2.stable, russian text)
0%
Description
Change notification tasks in Redmine by e-mail come with unreadable subject of the message if the subject contains more than 167 (approximately) Russian letters, as in this report, due to incorrect partition message subject to multiple lines no longer than approximately 1000 characters 7-bit encoding, and with the transfer of the middle of the encoded character (each Russian letter is encoded here 6 bytes).
Tested on Mozilla Thunderbird and some more e-mail client (redmine 1.3.2)
After updating redmine (2.5.2) played only if there are no spaces in the subject, as on the gaps redmine now additionally line breaks within an acceptable field.
Уведомления об изменении задач в Redmine по e-mail приходят с нечитаемой темой сообщения, если в теме задачи содержится более 167 (примерно) русских букв, как в этом сообщении, из-за некорректного разбиения темы сообщения на несколько строк длиной не более примерно 1000 символов 7-битной кодировки, причём с переносом посреди закодированного символа (каждая русская буква кодируется здесь 6 байтами).
Проверено на Mozilla Thunderbird и каком-то ещё почтовом клиенте. (redmine 1.3.2)
После обновления redmine воспроизводится только если в теме нет пробелов, так как по пробелам redmine (2.5.2) теперь дополнительно переносит строку в допустимых местах.
Related issues
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
Duplicate of #16859.
Updated by Toshi MARUYAMA almost 10 years ago
- Is duplicate of Defect #16859: rdm-mailhandler: subject corruption added
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from Closed to New
- Resolution deleted (
Duplicate)
Sorry, this issue is for sending mail
Updated by Toshi MARUYAMA almost 10 years ago
- Is duplicate of deleted (Defect #16859: rdm-mailhandler: subject corruption)
Updated by Toshi MARUYAMA almost 10 years ago
- Related to Defect #16859: rdm-mailhandler: subject corruption added
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from New to Needs feedback
See Submissions and #5784#note-2.
Updated by Toshi MARUYAMA almost 10 years ago
- Related to Defect #5784: Mail subject is cutting on MS Exchange 2007, 2010 after 256 character. (RFC2047) added
Updated by Имя Фамилия almost 10 years ago
At least one of the following six examples of subject reproduce error:
- zzzzzzабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвга
- zzzzzабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгаб
- zzzzабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабв
- zzzабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвг
- zzабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвга
- zабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгабвгаб
Example number depends on the version redmine.
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -1,3 +1,5 @@
+# encoding: utf-8
+#
# Redmine - project management software
# Copyright (C) 2006-2015 Jean-Philippe Lang
#
@@ -425,6 +427,16 @@ class MailerTest < ActiveSupport::TestCa
assert_mail_body_match '(Private notes)', last_email
end
+ def test_issue_subject
+ ActionMailer::Base.deliveries.clear
+ subject = "日本語12日本語34" * 26
+ issue = Issue.generate!(:subject => subject)
+ mail = last_email
+ Mailer.deliver_issue_add(issue)
+ puts mail.subject
+ puts mail.subject.size
+ end
+
def test_issue_edit_with_relation_should_notify_users_who_can_see_the_related_issue
issue = Issue.generate!
issue.init_journal(User.find(1))
$ ruby test/unit/mailer_test.rb -n test_issue_subject Run options: -n test_issue_subject --seed 985 # Running: E Finished in 1.078041s, 0.9276 runs/s, 0.0000 assertions/s. 1) Error: MailerTest#test_issue_subject: ActiveRecord::RecordInvalid: Validation failed: Subject is too long (maximum is 255 characters) test/object_helpers.rb:95:in `generate!' test/unit/mailer_test.rb:433:in `test_issue_subject' 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
:maxlength => 255
http://www.redmine.org/projects/redmine/repository/entry/tags/2.5.3/app/models/issue.rb#L69
validates_length_of :subject, :maximum => 255
Updated by Toshi MARUYAMA almost 10 years ago
I recommend you to use Ruby >= 1.9 if you use Ruby 1.8.7.
Updated by Toshi MARUYAMA almost 10 years ago
- Related to deleted (Defect #16859: rdm-mailhandler: subject corruption)