プロジェクト

全般

プロフィール

Vote #76251

完了

Broken HTML sanitizer refence breaks email receiving

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
94
issue_org_id:
19537
author_id:
124832
assigned_to_id:
1
comments:
10
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
92
ステータス-->[Closed]

説明

HTML emails fail silently when receiving emails via IMAP due to broken HTML sanitizer reference in @MailHandler.full_sanitizer@ on line 449 of app/models/mail_handler.rb:

def self.full_sanitizer
  @full_sanitizer ||= HTML::FullSanitizer.new
end

Changing this line to @@full_sanitizer ||= Rails::Html::FullSanitizer.new@ works, although it didn't do a particularly good job on the stuck email I'd sent from Outlook.

Redmine: 3.0.1
Rails: 4.2.0
Ruby: 2.2.0


journals

This line @full_sanitizer ||= Rails::Html::FullSanitizer.new works:
Ruby 2.0.0
Rails 4.2.0
Redmine 3.0.1

And normally works on import mail sent by MS Outlook 2013.
--------------------------------------------------------------------------------
This is a new implementation of rails sanitizer, This did not work, So using the old deprecated one, through a GEM.

gem 'rails-deprecated_sanitizer'

Until this is corrected with the rails sanitizer...! :)
--------------------------------------------------------------------------------
I've created a Gemfile.local file in my install and added @gem 'rails-deprecated_sanitizer'@, which works nicely without having to change MailHandler over to the new sanitizer.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Fixed in r14219, the default Rails sanitizer is now used.
--------------------------------------------------------------------------------
The text striping is not handled.
I am getting some unwanted Outlook mail tags.
Please let me know if this needs to be reported as another bug ?

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Rupesh J wrote:
> The text striping is not handled.
> I am getting some unwanted Outlook mail tags.

Did it work on Redmine 2.x?

> Please let me know if this needs to be reported as another bug ?

If it is regression of Redmine 3.0,
please create new issue because version:3.0.2 was released.

If it is not regression of Redmine 3.0,
I think it is duplicate of #13209.

--------------------------------------------------------------------------------
Ok, I will create a regression bug.

It worked in
* 2.6.x
* 3.0.1 using the gem 'rails-deprecated_sanitizer'

--------------------------------------------------------------------------------
Thank you for creating #19737.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリEmail receiving_29 にセット
  • 対象バージョン3.0.2_94 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0