1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-11 03:33:07 +00:00

Backport the fix r18239 to 3.4-stable (#31503).

git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@18241 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-06-10 02:09:31 +00:00
parent ad816523ed
commit 92a74472f3
2 changed files with 12 additions and 1 deletions

View File

@ -286,7 +286,7 @@ class MailHandler < ActionMailer::Base
reply
else
if logger
logger.info "MailHandler: ignoring reply from [#{sender_email}] to a locked topic"
logger.info "MailHandler: ignoring reply from [#{email.from.first}] to a locked topic"
end
end
end

View File

@ -955,6 +955,17 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal Message.find(1), m.parent
end
def test_reply_to_a_locked_topic
# Lock the topic
topic = Message.find(2).parent
topic.update_attribute :locked, true
assert_no_difference('topic.replies_count') do
m = submit_email('message_reply_by_subject.eml')
assert_not_kind_of Message, m
end
end
def test_should_convert_tags_of_html_only_emails
with_settings :text_formatting => 'textile' do
issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'})